<!DOCTYPE html>
<!--[if IE 7]>
<html class="ie ie7 " lang="en-US">
<![endif]-->
<!--[if IE 8]>
<html class="ie ie8 " lang="en-US">
<![endif]-->
<!--[if IE 9]>
<html class="ie ie9 " lang="en-US">
<![endif]-->
<!--[if !(IE 7) | !(IE 8) | !(IE 9)  ]><!-->
<html style="" class=" js no-flexbox canvas canvastext webgl no-touch geolocation postmessage no-websqldatabase indexeddb hashchange history draganddrop websockets rgba hsla multiplebgs backgroundsize borderimage borderradius boxshadow textshadow opacity cssanimations csscolumns cssgradients no-cssreflections csstransforms csstransforms3d csstransitions fontface generatedcontent video audio localstorage sessionstorage webworkers applicationcache svg inlinesvg smil svgclippaths" lang="en-US"><!--<![endif]--><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
	<title>Sending SMS from JavaScript using SMS plugin for Phonegap  | JavatechIG.com</title>
	<link rel="profile" href="http://gmpg.org/xfn/11">
	<link rel="pingback" href="http://javatechig.com/xmlrpc.php">
	<!--[if lt IE 9]>
  <link rel="stylesheet" href="http://javatechig.com/wp-content/themes/dw-argo_1.0.1_theme/css/ie8.css">
	<script src="http://javatechig.com/wp-content/themes/dw-argo_1.0.1_theme/js/html5.js" type="text/javascript"></script>
	<![endif]-->
	<link rel="alternate" type="application/rss+xml" title="JavatechIG.com » Feed" href="http://javatechig.com/feed">
<link rel="alternate" type="application/rss+xml" title="JavatechIG.com » Comments Feed" href="http://javatechig.com/comments/feed">
<link rel="alternate" type="application/rss+xml" title="JavatechIG.com » Sending SMS from JavaScript using Phonegap SMS plugin Comments Feed" href="http://javatechig.com/phonegap/phonegap-sms-plugin-android/feed">
<link rel="stylesheet" id="blogsynthesis-scroll-to-top-style-css" href="phonegap-sms-plugin-android_files/jss-style.css" type="text/css" media="all">
<link rel="stylesheet" id="validate-engine-css-css" href="phonegap-sms-plugin-android_files/validationEngine.css" type="text/css" media="all">
<link rel="stylesheet" id="tss_css-css" href="phonegap-sms-plugin-android_files/tss.css" type="text/css" media="all">
<link rel="stylesheet" id="cube3x-social-css-css" href="phonegap-sms-plugin-android_files/cube3x-social-style.css" type="text/css" media="all">
<link rel="stylesheet" id="dwqa-style-css" href="phonegap-sms-plugin-android_files/style_002.css" type="text/css" media="all">
<link rel="stylesheet" id="arevico_scsfbcss-css" href="phonegap-sms-plugin-android_files/scs.css" type="text/css" media="all">
<link rel="stylesheet" id="ppc-main-css" href="phonegap-sms-plugin-android_files/ppc.css" type="text/css" media="all">
<style type="text/css">
.ppc .attachment-60x60 {
	width: 60px !important;
	height: 60px !important;
}
</style>
<link rel="stylesheet" id="ppc-list-css" href="phonegap-sms-plugin-android_files/ppc-list.css" type="text/css" media="all">
<link rel="stylesheet" id="toc-screen-css" href="phonegap-sms-plugin-android_files/screen.css" type="text/css" media="all">
<link rel="stylesheet" id="wpProQuiz_front_style-css" href="phonegap-sms-plugin-android_files/wpProQuiz_front.css" type="text/css" media="all">
<link rel="stylesheet" id="dw-brick-style-css" href="phonegap-sms-plugin-android_files/style.css" type="text/css" media="all">
<link rel="stylesheet" id="dw_template_style-css" href="phonegap-sms-plugin-android_files/template.css" type="text/css" media="all">
<link rel="stylesheet" id="metro_style_social_widget-css" href="phonegap-sms-plugin-android_files/metro.css" type="text/css" media="all">
<script src="phonegap-sms-plugin-android_files/a_usersync.htm" async="" type="text/javascript"></script><script src="phonegap-sms-plugin-android_files/phonegap-sms-plugin-android.htm" async=""></script><script async="" src="phonegap-sms-plugin-android_files/cbgapi.loaded_1"></script><script async="" src="phonegap-sms-plugin-android_files/cbgapi.loaded_0"></script><script src="phonegap-sms-plugin-android_files/widgets.js" id="twitter-wjs"></script><script gapi_processed="true" src="phonegap-sms-plugin-android_files/plusone.js" async="" type="text/javascript"></script><script src="phonegap-sms-plugin-android_files/ga.js" async="" type="text/javascript"></script><script src="phonegap-sms-plugin-android_files/ga.js" async="" type="text/javascript"></script><script type="text/javascript" src="phonegap-sms-plugin-android_files/jquery_004.js"></script>
<script type="text/javascript" src="phonegap-sms-plugin-android_files/jss-script.js"></script>
<script type="text/javascript">
/* <![CDATA[ */
var tss_objects = {"tss_auto":"checked","tss_scaling":"0.75","tss_maps":"","tss_all":"checked","tss_time":"10","tss_mob":"checked","tss_images":"http:\/\/javatechig.com\/wp-content\/plugins\/slimbox-2-slideshow\/images.xml"};
/* ]]> */
</script>
<script type="text/javascript" src="phonegap-sms-plugin-android_files/tss.js"></script>
<script type="text/javascript" src="phonegap-sms-plugin-android_files/all-in-one-social.js"></script>
<script type="text/javascript" src="phonegap-sms-plugin-android_files/scs.js"></script>
<script type="text/javascript">
/* <![CDATA[ */
var lb_l_ret = {"fb_id":"228850867127175","display_on_page":"1","display_on_post":"1","display_on_homepage":"1","display_on_archive":"1","show_once":"3","delay":"1000","fancybox":"","facebookheader":"","gaevent":"","eam":"","hideonlike":""};
/* ]]> */
</script>
<script type="text/javascript" src="phonegap-sms-plugin-android_files/launch.js"></script>
<script type="text/javascript" src="phonegap-sms-plugin-android_files/jquery_005.js"></script>
<script type="text/javascript" src="phonegap-sms-plugin-android_files/comment-reply.js"></script>
<script type="text/javascript" src="phonegap-sms-plugin-android_files/bootstrap-affix.js"></script>
<script type="text/javascript" src="phonegap-sms-plugin-android_files/bootstrap-alert.js"></script>
<script type="text/javascript" src="phonegap-sms-plugin-android_files/bootstrap-button.js"></script>
<script type="text/javascript" src="phonegap-sms-plugin-android_files/bootstrap-carousel.js"></script>
<script type="text/javascript" src="phonegap-sms-plugin-android_files/bootstrap-collapse.js"></script>
<script type="text/javascript" src="phonegap-sms-plugin-android_files/bootstrap-dropdown.js"></script>
<script type="text/javascript" src="phonegap-sms-plugin-android_files/bootstrap-modal.js"></script>
<script type="text/javascript" src="phonegap-sms-plugin-android_files/bootstrap-tooltip.js"></script>
<script type="text/javascript" src="phonegap-sms-plugin-android_files/bootstrap-popover.js"></script>
<script type="text/javascript" src="phonegap-sms-plugin-android_files/bootstrap-scrollspy.js"></script>
<script type="text/javascript" src="phonegap-sms-plugin-android_files/bootstrap-tab.js"></script>
<script type="text/javascript" src="phonegap-sms-plugin-android_files/bootstrap-transition.js"></script>
<script type="text/javascript" src="phonegap-sms-plugin-android_files/bootstrap-typeahead.js"></script>
<script type="text/javascript" src="phonegap-sms-plugin-android_files/jquery_002.js"></script>
<script type="text/javascript" src="phonegap-sms-plugin-android_files/modernizr.js"></script>
<script type="text/javascript" src="phonegap-sms-plugin-android_files/jquery.js"></script>
<script type="text/javascript" src="phonegap-sms-plugin-android_files/tinynav.js"></script>
<script type="text/javascript">
/* <![CDATA[ */
var singleScript = {"is_cat_refer":"0","ajax_url":"http:\/\/javatechig.com\/wp-admin\/admin-ajax.php","postId":"2985","nonce":"9119099c51","text_readingnow":"Reading now","text_streamlist_end":"No more post to display"};
/* ]]> */
</script>
<script type="text/javascript" src="phonegap-sms-plugin-android_files/single.js"></script>
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://javatechig.com/xmlrpc.php?rsd">
<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://javatechig.com/wp-includes/wlwmanifest.xml"> 
<link rel="prev" title="Android Button Example" href="http://javatechig.com/android/android-button-example">
<link rel="next" title="Android Menu Example" href="http://javatechig.com/android/android-menu-example">
<meta name="generator" content="WordPress 3.7.1">
<link rel="shortlink" href="http://javatechig.com/?p=2985">
<style type="text/css">
img.lazy { display: none; }
</style>
<link type="text/css" rel="stylesheet" href="phonegap-sms-plugin-android_files/pfp.css">
<script type="text/javascript" src="phonegap-sms-plugin-android_files/shCore.js"></script>
<script type="text/javascript" src="phonegap-sms-plugin-android_files/shAutoloader.js"></script>
<link type="text/css" rel="stylesheet" href="phonegap-sms-plugin-android_files/shCore.css">
<link type="text/css" rel="stylesheet" href="phonegap-sms-plugin-android_files/shThemeMDUltra.css">
<style type="text/css">div#toc_container ul li {font-size: 100%;}</style><link rel="shortcut icon" href="http://javatechig.com/wp-content/uploads/2013/10/javatechig-fav-icon.png"><style type="text/css"> 
        .navbar .brand span { 
            background: url("") no-repeat center; 
        }
        </style><!-- Google analytics -->
<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-38616813-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>

<!--end Google analytics -->
<!-- All in One SEO Pack 2.1.1 by Michael Torbert of Semper Fi Web Design[423,500] -->
<link rel="author" href="http://112766569429279922709/">
<meta name="description" content="Sending SMS from JavaScript using SMS plugin for Phonegap Codova. This Android Phonegap plugin allows you to easily send SMS in android using both native SMS Manager or by invoking the default android SMS app. This plugin works with PhoneGap 2.9.x version">

<meta name="keywords" content="sending sms from javascript using sms plugin for phonegap ,phonegap">

<link rel="canonical" href="http://javatechig.com/phonegap/phonegap-sms-plugin-android">
		<script type="text/javascript">
		  var _gaq = _gaq || [];
		  _gaq.push(['_setAccount', 'UA-38616813-1']);
		  _gaq.push(['_setAllowLinker', true]);
		  _gaq.push(['_setDomainName', 'javatechig.com']);
		  _gaq.push(['_trackPageview']);
		  (function() {
		    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
			ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
		    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
		  })();
		</script>
		<script type="text/javascript">
		function recordOutboundLink(link, category, action) {
					_gat._getTrackerByName()._trackEvent(category, action);
					if ( link.target == '_blank' ) return true;
			setTimeout('document.location = "' + link.href + '"', 100);
			return false;
		}
			/* use regular Javascript for this */
			function getAttr(ele, attr) {
				var result = (ele.getAttribute && ele.getAttribute(attr)) || null;
				if( !result ) {
					var attrs = ele.attributes;
					var length = attrs.length;
					for(var i = 0; i < length; i++)
					if(attr[i].nodeName === attr) result = attr[i].nodeValue;
				}
				return result;
			}
			function aiosp_addLoadEvent(func) {
			  var oldonload = window.onload;
			  if (typeof window.onload != 'function') {
			    window.onload = func;
			  } else {
			    window.onload = function() {
			      if (oldonload) {
			        oldonload();
			      }
			      func();
			    }
			  }
			}

			aiosp_addLoadEvent(function () {
				var links = document.getElementsByTagName('a');
				for (var x=0; x < links.length; x++) {
					if (typeof links[x] == 'undefined') continue;
					if (typeof links[x].onclick != 'undefined') continue;
					links[x].onclick = function () {
						var mydomain = new RegExp(document.domain, 'i');
						href = getAttr(this, 'href');
						if(href && href.toLowerCase().indexOf('http') === 0 && !mydomain.test(href)) {
							recordOutboundLink(this, 'Outbound Links', href);
						}
					}
				}
			});
		</script>
<!-- /all in one seo pack -->
  
<script src="phonegap-sms-plugin-android_files/embed.js" async="" type="text/javascript"></script><script src="phonegap-sms-plugin-android_files/all.js" async="" id="facebook-jssdk"></script><style type="text/css">.fb_hidden{position:absolute;top:-10000px;z-index:10001}
.fb_invisible{display:none}
.fb_reset{background:none;border:0;border-spacing:0;color:#000;cursor:auto;direction:ltr;font-family:"lucida grande", tahoma, verdana, arial, sans-serif;font-size:11px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:1;margin:0;overflow:visible;padding:0;text-align:left;text-decoration:none;text-indent:0;text-shadow:none;text-transform:none;visibility:visible;white-space:normal;word-spacing:normal}
.fb_reset > div{overflow:hidden}
.fb_link img{border:none}
.fb_dialog{background:rgba(82, 82, 82, .7);position:absolute;top:-10000px;z-index:10001}
.fb_dialog_advanced{padding:10px;-moz-border-radius:8px;-webkit-border-radius:8px;border-radius:8px}
.fb_dialog_content{background:#fff;color:#333}
.fb_dialog_close_icon{background:url(http://static.ak.fbcdn.net/rsrc.php/v2/yq/r/IE9JII6Z1Ys.png) no-repeat scroll 0 0 transparent;_background-image:url(http://static.ak.fbcdn.net/rsrc.php/v2/yL/r/s816eWC-2sl.gif);cursor:pointer;display:block;height:15px;position:absolute;right:18px;top:17px;width:15px;top:8px\9;right:7px\9}
.fb_dialog_mobile .fb_dialog_close_icon{top:5px;left:5px;right:auto}
.fb_dialog_padding{background-color:transparent;position:absolute;width:1px;z-index:-1}
.fb_dialog_close_icon:hover{background:url(http://static.ak.fbcdn.net/rsrc.php/v2/yq/r/IE9JII6Z1Ys.png) no-repeat scroll 0 -15px transparent;_background-image:url(http://static.ak.fbcdn.net/rsrc.php/v2/yL/r/s816eWC-2sl.gif)}
.fb_dialog_close_icon:active{background:url(http://static.ak.fbcdn.net/rsrc.php/v2/yq/r/IE9JII6Z1Ys.png) no-repeat scroll 0 -30px transparent;_background-image:url(http://static.ak.fbcdn.net/rsrc.php/v2/yL/r/s816eWC-2sl.gif)}
.fb_dialog_loader{background-color:#f2f2f2;border:1px solid #606060;font-size:24px;padding:20px}
.fb_dialog_top_left,
.fb_dialog_top_right,
.fb_dialog_bottom_left,
.fb_dialog_bottom_right{height:10px;width:10px;overflow:hidden;position:absolute}
.fb_dialog_top_left{background:url(http://static.ak.fbcdn.net/rsrc.php/v2/ye/r/8YeTNIlTZjm.png) no-repeat 0 0;left:-10px;top:-10px}
.fb_dialog_top_right{background:url(http://static.ak.fbcdn.net/rsrc.php/v2/ye/r/8YeTNIlTZjm.png) no-repeat 0 -10px;right:-10px;top:-10px}
.fb_dialog_bottom_left{background:url(http://static.ak.fbcdn.net/rsrc.php/v2/ye/r/8YeTNIlTZjm.png) no-repeat 0 -20px;bottom:-10px;left:-10px}
.fb_dialog_bottom_right{background:url(http://static.ak.fbcdn.net/rsrc.php/v2/ye/r/8YeTNIlTZjm.png) no-repeat 0 -30px;right:-10px;bottom:-10px}
.fb_dialog_vert_left,
.fb_dialog_vert_right,
.fb_dialog_horiz_top,
.fb_dialog_horiz_bottom{position:absolute;background:#525252;filter:alpha(opacity=70);opacity:.7}
.fb_dialog_vert_left,
.fb_dialog_vert_right{width:10px;height:100%}
.fb_dialog_vert_left{margin-left:-10px}
.fb_dialog_vert_right{right:0;margin-right:-10px}
.fb_dialog_horiz_top,
.fb_dialog_horiz_bottom{width:100%;height:10px}
.fb_dialog_horiz_top{margin-top:-10px}
.fb_dialog_horiz_bottom{bottom:0;margin-bottom:-10px}
.fb_dialog_iframe{line-height:0}
.fb_dialog_content .dialog_title{background:#6d84b4;border:1px solid #3b5998;color:#fff;font-size:14px;font-weight:bold;margin:0}
.fb_dialog_content .dialog_title > span{background:url(http://static.ak.fbcdn.net/rsrc.php/v2/yd/r/Cou7n-nqK52.gif)
no-repeat 5px 50%;float:left;padding:5px 0 7px 26px}
body.fb_hidden{-webkit-transform:none;height:100%;margin:0;overflow:visible;position:absolute;top:-10000px;left:0;width:100%}
.fb_dialog.fb_dialog_mobile.loading{background:url(http://static.ak.fbcdn.net/rsrc.php/v2/ya/r/3rhSv5V8j3o.gif)
white no-repeat 50% 50%;min-height:100%;min-width:100%;overflow:hidden;position:absolute;top:0;z-index:10001}
.fb_dialog.fb_dialog_mobile.loading.centered{max-height:590px;min-height:590px;max-width:500px;min-width:500px}
#fb-root #fb_dialog_ipad_overlay{background:rgba(0, 0, 0, .45);position:absolute;left:0;top:0;width:100%;min-height:100%;z-index:10000}
#fb-root #fb_dialog_ipad_overlay.hidden{display:none}
.fb_dialog.fb_dialog_mobile.loading iframe{visibility:hidden}
.fb_dialog_content .dialog_header{-webkit-box-shadow:white 0 1px 1px -1px inset;background:-webkit-gradient(linear, 0% 0%, 0% 100%, from(#738ABA), to(#2C4987));border-bottom:1px solid;border-color:#1d4088;color:#fff;font:14px Helvetica, sans-serif;font-weight:bold;text-overflow:ellipsis;text-shadow:rgba(0, 30, 84, .296875) 0 -1px 0;vertical-align:middle;white-space:nowrap}
.fb_dialog_content .dialog_header table{-webkit-font-smoothing:subpixel-antialiased;height:43px;width:100%
}
.fb_dialog_content .dialog_header td.header_left{font-size:12px;padding-left:5px;vertical-align:middle;width:60px
}
.fb_dialog_content .dialog_header td.header_right{font-size:12px;padding-right:5px;vertical-align:middle;width:60px
}
.fb_dialog_content .touchable_button{background:-webkit-gradient(linear, 0% 0%, 0% 100%, from(#4966A6),
color-stop(0.5, #355492), to(#2A4887));border:1px solid #29447e;-webkit-background-clip:padding-box;-webkit-border-radius:3px;-webkit-box-shadow:rgba(0, 0, 0, .117188) 0 1px 1px inset,
rgba(255, 255, 255, .167969) 0 1px 0;display:inline-block;margin-top:3px;max-width:85px;line-height:18px;padding:4px 12px;position:relative}
.fb_dialog_content .dialog_header .touchable_button input{border:none;background:none;color:#fff;font:12px Helvetica, sans-serif;font-weight:bold;margin:2px -12px;padding:2px 6px 3px 6px;text-shadow:rgba(0, 30, 84, .296875) 0 -1px 0}
.fb_dialog_content .dialog_header .header_center{color:#fff;font-size:16px;font-weight:bold;line-height:18px;text-align:center;vertical-align:middle}
.fb_dialog_content .dialog_content{background:url(http://static.ak.fbcdn.net/rsrc.php/v2/y9/r/jKEcVPZFk-2.gif) no-repeat 50% 50%;border:1px solid #555;border-bottom:0;border-top:0;height:150px}
.fb_dialog_content .dialog_footer{background:#f2f2f2;border:1px solid #555;border-top-color:#ccc;height:40px}
#fb_dialog_loader_close{float:left}
.fb_dialog.fb_dialog_mobile .fb_dialog_close_button{text-shadow:rgba(0, 30, 84, .296875) 0 -1px 0}
.fb_dialog.fb_dialog_mobile .fb_dialog_close_icon{visibility:hidden}
.fb_iframe_widget{display:inline-block;position:relative}
.fb_iframe_widget span{display:inline-block;position:relative;text-align:justify}
.fb_iframe_widget iframe{position:absolute}
.fb_iframe_widget_lift{z-index:1}
.fb_hide_iframes iframe{position:relative;left:-10000px}
.fb_iframe_widget_loader{position:relative;display:inline-block}
.fb_iframe_widget_fluid{display:inline}
.fb_iframe_widget_fluid span{width:100%}
.fb_iframe_widget_loader iframe{min-height:32px;z-index:2;zoom:1}
.fb_iframe_widget_loader .FB_Loader{background:url(http://static.ak.fbcdn.net/rsrc.php/v2/y9/r/jKEcVPZFk-2.gif) no-repeat;height:32px;width:32px;margin-left:-16px;position:absolute;left:50%;z-index:4}
.fb_connect_bar_container div,
.fb_connect_bar_container span,
.fb_connect_bar_container a,
.fb_connect_bar_container img,
.fb_connect_bar_container strong{background:none;border-spacing:0;border:0;direction:ltr;font-style:normal;font-variant:normal;letter-spacing:normal;line-height:1;margin:0;overflow:visible;padding:0;text-align:left;text-decoration:none;text-indent:0;text-shadow:none;text-transform:none;visibility:visible;white-space:normal;word-spacing:normal;vertical-align:baseline}
.fb_connect_bar_container{position:fixed;left:0 !important;right:0 !important;height:42px !important;padding:0 25px !important;margin:0 !important;vertical-align:middle !important;border-bottom:1px solid #333 !important;background:#3b5998 !important;z-index:99999999 !important;overflow:hidden !important}
.fb_connect_bar_container_ie6{position:absolute;top:expression(document.compatMode=="CSS1Compat"? document.documentElement.scrollTop+"px":body.scrollTop+"px")}
.fb_connect_bar{position:relative;margin:auto;height:100%;width:100%;padding:6px 0 0 0 !important;background:none;color:#fff !important;font-family:"lucida grande", tahoma, verdana, arial, sans-serif !important;font-size:13px !important;font-style:normal !important;font-variant:normal !important;font-weight:normal !important;letter-spacing:normal !important;line-height:1 !important;text-decoration:none !important;text-indent:0 !important;text-shadow:none !important;text-transform:none !important;white-space:normal !important;word-spacing:normal !important}
.fb_connect_bar a:hover{color:#fff}
.fb_connect_bar .fb_profile img{height:30px;width:30px;vertical-align:middle;margin:0 6px 5px 0}
.fb_connect_bar div a,
.fb_connect_bar span,
.fb_connect_bar span a{color:#bac6da;font-size:11px;text-decoration:none}
.fb_connect_bar .fb_buttons{float:right;margin-top:7px}
.fb_edge_widget_with_comment{position:relative;*z-index:1000}
.fb_edge_widget_with_comment span.fb_edge_comment_widget{position:absolute}
.fb_edge_widget_with_comment span.fb_send_button_form_widget{z-index:1}
.fb_edge_widget_with_comment span.fb_send_button_form_widget .FB_Loader{left:0;top:1px;margin-top:6px;margin-left:0;background-position:50% 50%;background-color:#fff;height:150px;width:394px;border:1px #666 solid;border-bottom:2px solid #283e6c;z-index:1}
.fb_edge_widget_with_comment span.fb_send_button_form_widget.dark .FB_Loader{background-color:#000;border-bottom:2px solid #ccc}
.fb_edge_widget_with_comment span.fb_send_button_form_widget.siderender
.FB_Loader{margin-top:0}
.fbpluginrecommendationsbarleft,
.fbpluginrecommendationsbarright{position:fixed !important;bottom:0;z-index:999}
.fbpluginrecommendationsbarleft{left:10px}
.fbpluginrecommendationsbarright{right:10px}</style></head>

<body data-twttr-rendered="true" class="single single-post postid-2985 single-format-standard">
<div id="page">
  <header id="mashhead" class="navbar navbar-inverse navbar-fixed-top" role="banner">
    <div class="navbar-inner">
      <div class="container">
                <a class="brand no-logo-image" href="http://javatechig.com/" title="JavatechIG.com" rel="home"> 
          <span>JavatechIG.com</span>
        </a>
        <ul id="menu-main-menu" class="nav nav-offcanvas"><li id="menu-item-2196" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-home menu-item-has-children menu-item-2196 has-sub-menu"><a href="http://javatechig.com/">Home</a>
<i class="show-sub-menu-btn icon-chevron-right"></i><ul class="sub-menu">
	<li id="menu-item-1023" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-1023"><a href="http://javatechig.com/authors/">Authors</a></li>
	<li id="menu-item-3839" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-3839"><a href="http://javatechig.com/privacy-policy">Privacy Policy</a></li>
	<li id="menu-item-3838" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-3838"><a href="http://javatechig.com/guest-blogging">Guest Blogging</a></li>
	<li id="menu-item-3837" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-3837"><a href="http://javatechig.com/blog-sitemap">Sitemap</a></li>
	<li id="menu-item-3840" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-3840"><a href="http://javatechig.com/contact-us">Contact Us</a></li>
</ul>
</li>
<li id="menu-item-3892" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children menu-item-3892 has-sub-menu"><a href="http://javatechig.com/category/android">Android</a>
<i class="show-sub-menu-btn icon-chevron-right"></i><ul class="sub-menu">
	<li id="menu-item-3893" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-3893"><a href="http://javatechig.com/tutorials/android-application-development-tutorials/">All Android Tutorials</a></li>
	<li id="menu-item-3896" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-3896"><a href="http://javatechig.com/tag/android-ui/">Android UI Tutorials</a></li>
	<li id="menu-item-3894" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-3894"><a href="http://javatechig.com/tag/android-advanced/">Android Advance Tutorials</a></li>
	<li id="menu-item-3895" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-3895"><a href="http://javatechig.com/tag/android-how-tos/">Android How To’s</a></li>
</ul>
</li>
<li id="menu-item-3176" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children menu-item-3176 has-sub-menu"><a href="http://javatechig.com/category/java">Java</a>
<i class="show-sub-menu-btn icon-chevron-right"></i><ul class="sub-menu">
	<li id="menu-item-3186" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-3186"><a href="http://javatechig.com/category/java/">Core Java  Basics</a></li>
	<li id="menu-item-3184" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-3184"><a href="http://javatechig.com/java/java-string-complete-tutorial/">Java String Complete Tutorial</a></li>
	<li id="menu-item-3185" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-3185"><a href="http://javatechig.com/java/java-enum-programming-tutorial/">Java enum Complete Tutorial</a></li>
	<li id="menu-item-3183" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-3183"><a href="http://javatechig.com/tag/design-patterns">Java Design Patterns</a></li>
</ul>
</li>
<li id="menu-item-2711" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children menu-item-2711 has-sub-menu"><a href="http://javatechig.com/category/blackberry">Blackberry</a>
<i class="show-sub-menu-btn icon-chevron-right"></i><ul class="sub-menu">
	<li id="menu-item-3188" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-3188"><a href="http://javatechig.com/category/blackberry/">All Blackberry Tutorials</a></li>
	<li id="menu-item-3187" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-3187"><a href="http://javatechig.com/tag/blackberry-ui/">Blackberry UI Tutorials</a></li>
	<li id="menu-item-3192" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-3192"><a href="http://javatechig.com/blackberry/http-connection-in-blackberry/">HTTP Connection in Blackberry</a></li>
	<li id="menu-item-3189" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-3189"><a href="http://javatechig.com/blackberry/persistent-storage-in-blackberry/">PersistentStore in blackberry</a></li>
	<li id="menu-item-3191" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-3191"><a href="http://javatechig.com/blackberry/recoding-call-in-blackberry/">Call Recording in Blackberry</a></li>
	<li id="menu-item-3190" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-3190"><a href="http://javatechig.com/blackberry/blackberry-interview-questions/">Blackberry FAQ’s</a></li>
</ul>
</li>
<li id="menu-item-1811" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children menu-item-1811 has-sub-menu"><a href="http://javatechig.com/tutorials">More..</a>
<i class="show-sub-menu-btn icon-chevron-right"></i><ul class="sub-menu">
	<li id="menu-item-3252" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3252"><a href="http://javatechig.com/category/java/struts">Java Struts Tutorials</a></li>
	<li id="menu-item-484" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-484"><a href="http://javatechig.com/category/sencha-touch">Sencha Touch</a></li>
	<li id="menu-item-100" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-100"><a href="http://javatechig.com/category/design-patterns">Design Patterns</a></li>
	<li id="menu-item-95" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-95"><a href="http://javatechig.com/category/j2me">J2ME Tutorials</a></li>
	<li id="menu-item-98" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-98"><a href="http://javatechig.com/category/gaming">Gaming</a></li>
</ul>
</li>
<li id="menu-item-3958" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-3958"><a href="http://javatechig.com/advertise">Advertise</a></li>
<li id="menu-item-4007" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children menu-item-4007 has-sub-menu"><a href="http://javatechig.com/questions">Q&amp;A</a>
<i class="show-sub-menu-btn icon-chevron-right"></i><ul class="sub-menu">
	<li id="menu-item-4013" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-4013"><a href="http://javatechig.com/questions">All Questions</a></li>
	<li id="menu-item-4012" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-4012"><a href="http://javatechig.com/ask-question">Ask Question</a></li>
</ul>
</li>
</ul>        <div class="navbar-search pull-right">
          <i class="icon-search"></i>
          	<form method="get" id="searchform" action="http://javatechig.com/">
		<input class="search-query" name="s" id="s" placeholder="Search" type="text">
	</form>
        </div>

        <!-- <ul class="nav pull-right">
          <li><a href="#myModal" data-toggle="modal"><i class="icon-user icon-white"></i></a></li>
        </ul> -->
      </div>
    </div>
  </header>
  <div class="handheld-header navbar navbar-inverse navbar-fixed-top">
    <button class="button-show-nav">
      <i class="icon-reorder"></i>
    </button>
        <a class="brand no-logo-image" href="http://javatechig.com/" title="JavatechIG.com" rel="home">
      <span>JavatechIG.com</span>
    </a>
    <button class="button-show-sidebar">
      <i class="icon-cog"></i>
    </button>
  </div>
  <div style="min-height: 834px;" id="main" class="site-main">
    <div class="container"><div id="primary">
    <div id="content">
        <div style="position: fixed; top: 80px; z-index: 1; height: 714px; overflow: hidden;" id="side-content">
            <div class="stream-list">
    <div style="width: auto; transform: translate(0px, 0px);" class="stream-list-inner">
        <article id="stream-post-2985" class="stream-post has-thumbnail reading-now">
            <time>Reading now</time>
            <div class="thumbnail">
                <a href="#">
                    <img src="phonegap-sms-plugin-android_files/phonegap_plugin-featured_image-101x55.png" class="attachment-60x60 wp-post-image" alt="phonegap plugin featured image" height="32" width="60">                </a>
            </div>
            <div class="content">
                <h4 class="title"><a href="http://javatechig.com/phonegap/phonegap-sms-plugin-android" alt="Sending SMS from JavaScript using Phonegap SMS plugin">Sending SMS from JavaScript using Phonegap SMS plugin</a></h4>
            </div>
        </article>
        
                <article id="stream-post-16" class="stream-post has-thumbnail">
            <time data-time="Aug 03, 2013">Aug 03, 2013</time>
            <div class="thumbnail">
                <a href="http://javatechig.com/android/android-button-example" alt="Android Button Example">
                    <img src="phonegap-sms-plugin-android_files/android_buttons-59x55.png" class="attachment-60,60 wp-post-image" alt="" height="55" width="59">                </a>
            </div>

            <div class="content">
                <h4 class="title"><a href="http://javatechig.com/android/android-button-example" alt="Android Button Example">Android Button Example</a></h4>
            </div>
        </article>
                <article id="stream-post-3758" class="stream-post has-thumbnail">
            <time data-time="Jul 30, 2013">Jul 30, 2013</time>
            <div class="thumbnail">
                <a href="http://javatechig.com/android/how-to-programmatically-zip-and-unzip-file-in-android" alt="How to Programmatically Zip and Unzip File in Android">
                    <img src="phonegap-sms-plugin-android_files/How-to-Programmatically-Zip-and-Unzip-File-in-Android--37x55.png" class="attachment-60,60 wp-post-image" alt="How to Programmatically Zip and Unzip File in Android" height="55" width="37">                </a>
            </div>

            <div class="content">
                <h4 class="title"><a href="http://javatechig.com/android/how-to-programmatically-zip-and-unzip-file-in-android" alt="How to Programmatically Zip and Unzip File in Android">How to Programmatically Zip and Unzip File in Android</a></h4>
            </div>
        </article>
                <article id="stream-post-2975" class="stream-post has-thumbnail">
            <time data-time="Jul 29, 2013">Jul 29, 2013</time>
            <div class="thumbnail">
                <a href="http://javatechig.com/java/convert-string-to-long-in-java" alt="Convert String to Long in Java">
                    <img src="phonegap-sms-plugin-android_files/Java_Header-89x55.png" class="attachment-60,60 wp-post-image" alt="Java_Header" height="37" width="60">                </a>
            </div>

            <div class="content">
                <h4 class="title"><a href="http://javatechig.com/java/convert-string-to-long-in-java" alt="Convert String to Long in Java">Convert String to Long in Java</a></h4>
            </div>
        </article>
                <article id="stream-post-2958" class="stream-post has-thumbnail">
            <time data-time="Jul 28, 2013">Jul 28, 2013</time>
            <div class="thumbnail">
                <a href="http://javatechig.com/java/converting-array-to-list-in-java" alt="Converting Array to List in java">
                    <img src="phonegap-sms-plugin-android_files/Java_Header-89x55.png" class="attachment-60,60 wp-post-image" alt="Java_Header" height="37" width="60">                </a>
            </div>

            <div class="content">
                <h4 class="title"><a href="http://javatechig.com/java/converting-array-to-list-in-java" alt="Converting Array to List in java">Converting Array to List in java</a></h4>
            </div>
        </article>
                <article id="stream-post-2943" class="stream-post has-thumbnail">
            <time data-time="Jul 28, 2013">Jul 28, 2013</time>
            <div class="thumbnail">
                <a href="http://javatechig.com/java/searching-arrays-and-collections-in-java" alt="Searching arrays and collections in java">
                    <img src="phonegap-sms-plugin-android_files/Java_Header-89x55.png" class="attachment-60,60 wp-post-image" alt="Java_Header" height="37" width="60">                </a>
            </div>

            <div class="content">
                <h4 class="title"><a href="http://javatechig.com/java/searching-arrays-and-collections-in-java" alt="Searching arrays and collections in java">Searching arrays and collections in java</a></h4>
            </div>
        </article>
                <article id="stream-post-2933" class="stream-post has-thumbnail">
            <time data-time="Jul 28, 2013">Jul 28, 2013</time>
            <div class="thumbnail">
                <a href="http://javatechig.com/java/using-static-import-in-java" alt="Using Static Import in Java">
                    <img src="phonegap-sms-plugin-android_files/Java_Header-89x55.png" class="attachment-60,60 wp-post-image" alt="Java_Header" height="37" width="60">                </a>
            </div>

            <div class="content">
                <h4 class="title"><a href="http://javatechig.com/java/using-static-import-in-java" alt="Using Static Import in Java">Using Static Import in Java</a></h4>
            </div>
        </article>
                <a href="#" class="loadmore" data-last="2933">Load more</a>
    </div>
</div>

        <div style="height: 714px; position: fixed; top: 80px; left: 250px; opacity: 0;" class="scrollbar"><div style="height: 549.942px;" class="scrollbar-inner"></div></div></div>

        <div id="main-content">
            <div id="main-content-inner">
                <div class="nextpost">
                                            <article id="post-2985" class="post-2985 post type-post status-publish format-standard hentry category-phonegap tag-phonegap clearfix">
	<div class="entry-inner">
		<header class="entry-header">
			<h1 class="entry-title">Sending SMS from JavaScript using Phonegap SMS plugin</h1>
			<div class="entry-meta meta-top">
				<span class="categories-links"><a href="http://javatechig.com/category/phonegap" title="View all posts in PhoneGap" rel="category tag">PhoneGap</a></span> <span class="author vcard">By <a class="url fn n" href="http://javatechig.com/author/nilanchala" title="View all posts by Nilanchala" rel="author">Nilanchala</a></span><span class="sep"> / </span><time class="entry-date" datetime="2013-08-03T10:35:50+00:00">August 3, 2013</time>
					
				<div class="post-navigation">
					<a class="btn btn-inverse nex" href="#"><span>next</span><i class="icon-angle-right"></i></a>
					<div class="nav-tip visible-desktop">Use ← → keys to navigate</div>	
				</div>

				<ul class="unstyled entry-actions">
					<li><a href="javscript:void%280%29" onclick="window.print();"><i class="icon-print"></i></a>
					</li>

					<li><a href="mailto:webmaster@designwall.com?Subject=Sending+SMS+from+JavaScript+using+Phonegap+SMS+plugin"><i class="icon-envelope-alt"></i></a>
					</li>
					
					<li>
						<a href="#" class="font-size-plus"> A+ </a>
						<a href="#" class="font-size-minus"> A-</a>
					</li>
				</ul>
			</div>
		</header>

		<div class="entry-content">
			<div id="toc_container" class="toc_white no_bullets"><p class="toc_title">Table of Contents</p><ul class="toc_list"><li><a href="#1-introduction">1. Introduction</a></li><li><a href="#2-plugin-download-link">2. Plugin Download Link</a></li><li><a href="#3-features-supported">3. Features supported</a></li><li><a href="#4-how-to-integrate-the-sms-plugin">4. How to integrate the SMS plugin</a><ul><li><a href="#41sending-sms-using-intent-method">4.1.Sending SMS using Intent method</a></li><li><a href="#42-sending-sms-using-sms-manager">4.2. Sending SMS using SMS manager</a></li></ul></li><li><a href="#5-complete-example">5. Complete Example</a><ul><li><a href="#51-how-to-integrate-the-sms-plugin">5.1. How to integrate the SMS plugin</a></li><li><a href="#52-creating-html-and-javascript-files">5.2. Creating html and JavaScript files</a></li><li><a href="#53-adding-plugin-source-to-project">5.3. Adding plugin source to project</a></li><li><a href="#54-configuring-sms-plugin">5.4. Configuring SMS plugin</a></li></ul></li><li><a href="#6-references">6. References</a></li></ul></div>

<h1><span id="1-introduction">1. Introduction</span></h1>
<p>This Android Phonegap plugin allows you to easily send SMS in android
 using both native SMS Manager or by invoking the default android SMS 
app. This plugin works with PhoneGap 2.9.x version. The sample example 
is tested with Phonegap 2.9.0 and Android 4.1.x on a Samsung Galaxy S 
III device.</p>
<h1><span id="2-plugin-download-link">2. Plugin Download Link</span></h1>
<p><a target="_blank" title="https://github.com/javatechig/phonegap-sms-plugin" href="https://github.com/javatechig/phonegap-sms-plugin"><strong>https://github.com/javatechig/phonegap-sms-plugin</strong></a></p>
<h1><span id="3-features-supported">3. Features supported</span></h1>
<ol>
<li>Send SMS using default SMS app using android intent method</li>
<li>Sends SMS using SMS manager</li>
</ol>
<p>The plugin source code is hosted over GitHub. You can grab a copy from below link</p>
<p><a href="http://javatechig.com/wp-content/uploads/2013/08/Sending-SMS-Using-PhoneGap-Plugin.png" title="Sending SMS Using PhoneGap Plugin" rel="lightbox2985"><img style="display: inline;" class="lazy aligncenter size-full wp-image-4026" alt="Sending SMS Using PhoneGap Plugin" src="phonegap-sms-plugin-android_files/Sending-SMS-Using-PhoneGap-Plugin.png" data-original="http://javatechig.com/wp-content/uploads/2013/08/Sending-SMS-Using-PhoneGap-Plugin.png" height="483" width="671"><noscript><img class="aligncenter size-full wp-image-4026" alt="Sending SMS Using PhoneGap Plugin" src="http://javatechig.com/wp-content/uploads/2013/08/Sending-SMS-Using-PhoneGap-Plugin.png" width="671" height="483" /></noscript></a></p>
<p>&nbsp;</p>
<h1><span id="4-how-to-integrate-the-sms-plugin">4. How to integrate the SMS plugin</span></h1>
<ul>
<li>Make sure you are using Phonegap plugin 2.9.x. If you are using a 
older versiion of Codova/PhoneGap plugin, you may grab a new copy from <a target="_blank" title="phonegap.com" href="http://www.phonegap.com/">http://www.phonegap.com</a></li>
<li>Place smsplugin.js file in&nbsp;your project’s www folder and 
include a reference to it in your html files. You can include reference 
by using</li>
</ul>
<div><div id="highlighter_1439" class="syntaxhighlighter  html"><div class="toolbar"><span><a href="#" class="toolbar_item command_help help">?</a></span></div><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td class="gutter"><div class="line number1 index0 alt2">1</div><div class="line number2 index1 alt1">2</div><div class="line number3 index2 alt2">3</div><div class="line number4 index3 alt1">4</div></td><td class="code"><div class="container"><div class="line number1 index0 alt2"><code class="html spaces">&nbsp;</code>&nbsp;</div><div class="line number2 index1 alt1"><code class="html comments">&lt;!-- for codova plugins --&gt;</code></div><div class="line number3 index2 alt2"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html plain">&lt;</code><code class="html keyword">script</code> <code class="html color1">type</code><code class="html plain">=</code><code class="html string">"text/javascript"</code> <code class="html color1">src</code><code class="html plain">=</code><code class="html string">"cordova.js"</code><code class="html plain">&gt;&lt;/</code><code class="html keyword">script</code><code class="html plain">&gt;</code></div><div class="line number4 index3 alt1"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html plain">&lt;</code><code class="html keyword">script</code> <code class="html color1">type</code><code class="html plain">=</code><code class="html string">"text/javascript"</code> <code class="html color1">src</code><code class="html plain">=</code><code class="html string">"smsplugin.js"</code><code class="html plain">&gt;&lt;/</code><code class="html keyword">script</code><code class="html plain">&gt;</code></div></div></td></tr></tbody></table></div></div>
<ul>
<li>Add the SmsPlugin.java file from src to your project’s src hierarchy. and then reference the plugin in your res/config.xml file</li>
</ul>
<div><div id="highlighter_922488" class="syntaxhighlighter  xml"><div class="toolbar"><span><a href="#" class="toolbar_item command_help help">?</a></span></div><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td class="gutter"><div class="line number1 index0 alt2">1</div><div class="line number2 index1 alt1">2</div><div class="line number3 index2 alt2">3</div><div class="line number4 index3 alt1">4</div></td><td class="code"><div class="container"><div class="line number1 index0 alt2"><code class="xml spaces">&nbsp;</code>&nbsp;</div><div class="line number2 index1 alt1"><code class="xml spaces">&nbsp;</code><code class="xml plain">&lt;</code><code class="xml keyword">feature</code> <code class="xml color1">name</code><code class="xml plain">=</code><code class="xml string">"SmsPlugin"</code><code class="xml plain">&gt;</code></div><div class="line number3 index2 alt2"><code class="xml spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="xml plain">&lt;</code><code class="xml keyword">param</code> <code class="xml color1">name</code><code class="xml plain">=</code><code class="xml string">"android-package"</code> <code class="xml color1">value</code><code class="xml plain">=</code><code class="xml string">"org.apache.cordova.plugin.SmsPlugin"</code><code class="xml plain">/&gt;</code></div><div class="line number4 index3 alt1"><code class="xml spaces">&nbsp;</code><code class="xml plain">&lt;/</code><code class="xml keyword">feature</code><code class="xml plain">&gt;</code></div></div></td></tr></tbody></table></div></div>
<ul>
<li>Ensure that your manifest contains the necessary permissions to send SMS messages.</li>
</ul>
<div><div id="highlighter_915825" class="syntaxhighlighter  xml"><div class="toolbar"><span><a href="#" class="toolbar_item command_help help">?</a></span></div><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td class="gutter"><div class="line number1 index0 alt2">1</div></td><td class="code"><div class="container"><div class="line number1 index0 alt2"><code class="xml plain">&lt;uses-permission android:name="android.permission.SEND_SMS"</code></div></div></td></tr></tbody></table></div></div>
<ul>
<li>Now let us call the plugin method by passing appropriate parameters to send SMS.</li>
</ul>
<h2><span id="41sending-sms-using-intent-method">4.1.Sending SMS using Intent method</span></h2>
<div><div id="highlighter_623559" class="syntaxhighlighter  java"><div class="toolbar"><span><a href="#" class="toolbar_item command_help help">?</a></span></div><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td class="gutter"><div class="line number1 index0 alt2">1</div><div class="line number2 index1 alt1">2</div><div class="line number3 index2 alt2">3</div><div class="line number4 index3 alt1">4</div><div class="line number5 index4 alt2">5</div><div class="line number6 index5 alt1">6</div><div class="line number7 index6 alt2">7</div><div class="line number8 index7 alt1">8</div><div class="line number9 index8 alt2">9</div><div class="line number10 index9 alt1">10</div><div class="line number11 index10 alt2">11</div></td><td class="code"><div class="container"><div class="line number1 index0 alt2"><code class="java comments">// intent param is needed to send sms using sms intent</code></div><div class="line number2 index1 alt1"><code class="java spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java plain">$(</code><code class="java string">"#btnSmsIntent"</code><code class="java plain">).click(function(){</code></div><div class="line number3 index2 alt2"><code class="java spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java plain">SmsPlugin.prototype.send(</code><code class="java string">'9731563021'</code><code class="java plain">, </code><code class="java string">'Your Message Here!'</code><code class="java plain">, </code><code class="java string">'INTENT'</code></div><div class="line number4 index3 alt1"><code class="java spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java plain">function () { </code></div><div class="line number5 index4 alt2"><code class="java spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java plain">alert(</code><code class="java string">'Message sent successfully'</code><code class="java plain">);&nbsp; </code></div><div class="line number6 index5 alt1"><code class="java spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java plain">},</code></div><div class="line number7 index6 alt2"><code class="java spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java plain">function (e) {</code></div><div class="line number8 index7 alt1"><code class="java spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java plain">alert(</code><code class="java string">'Message Failed:'</code> <code class="java plain">+ e);</code></div><div class="line number9 index8 alt2"><code class="java spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java plain">}</code></div><div class="line number10 index9 alt1"><code class="java spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java plain">);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </code></div><div class="line number11 index10 alt2"><code class="java spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java plain">});</code></div></div></td></tr></tbody></table></div></div>
<h2><span id="42-sending-sms-using-sms-manager">4.2. Sending SMS using SMS manager</span></h2>
<div><div id="highlighter_177161" class="syntaxhighlighter  java"><div class="toolbar"><span><a href="#" class="toolbar_item command_help help">?</a></span></div><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td class="gutter"><div class="line number1 index0 alt2">1</div><div class="line number2 index1 alt1">2</div><div class="line number3 index2 alt2">3</div><div class="line number4 index3 alt1">4</div><div class="line number5 index4 alt2">5</div><div class="line number6 index5 alt1">6</div><div class="line number7 index6 alt2">7</div><div class="line number8 index7 alt1">8</div><div class="line number9 index8 alt2">9</div><div class="line number10 index9 alt1">10</div><div class="line number11 index10 alt2">11</div></td><td class="code"><div class="container"><div class="line number1 index0 alt2"><code class="java comments">// intent param is needed to send sms using sms intent</code></div><div class="line number2 index1 alt1"><code class="java spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java plain">$(</code><code class="java string">"#btnSmsIntent"</code><code class="java plain">).click(function(){</code></div><div class="line number3 index2 alt2"><code class="java spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java plain">SmsPlugin.prototype.send(</code><code class="java string">'9731563021'</code><code class="java plain">, </code><code class="java string">'Your Message Here!'</code><code class="java plain">, </code><code class="java string">' '</code></div><div class="line number4 index3 alt1"><code class="java spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java plain">function () { </code></div><div class="line number5 index4 alt2"><code class="java spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java plain">alert(</code><code class="java string">'Message sent successfully'</code><code class="java plain">);&nbsp; </code></div><div class="line number6 index5 alt1"><code class="java spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java plain">},</code></div><div class="line number7 index6 alt2"><code class="java spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java plain">function (e) {</code></div><div class="line number8 index7 alt1"><code class="java spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java plain">alert(</code><code class="java string">'Message Failed:'</code> <code class="java plain">+ e);</code></div><div class="line number9 index8 alt2"><code class="java spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java plain">}</code></div><div class="line number10 index9 alt1"><code class="java spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java plain">);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </code></div><div class="line number11 index10 alt2"><code class="java spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java plain">});</code></div></div></td></tr></tbody></table></div></div>
<h1><span id="5-complete-example">5. Complete Example</span></h1>
<h2><span id="51-how-to-integrate-the-sms-plugin">5.1. How to integrate the SMS plugin</span></h2>
<p>Create a new android project using File-&gt; New android application 
using your eclipse. Follow the new app wizard steps to create an new 
android app. Make sure to add your android targets. In my example, I 
have used android 4.x as my build target for my android app.</p>
<h2><span id="52-creating-html-and-javascript-files">5.2. Creating html and JavaScript files</span></h2>
<p>Create a folder <code>'www'</code> under your project assets folder. The <code>www</code> folder will contain all of the JavaScript and html pages and library’s. If you look at the screen above, I have used <code>jQueery</code>
 framework for building such a simple user interface. Now I term it as 
simple, as I got this html from one of my JavaScript expert friend. 
However this simple example will be enough for demonstration.</p>
<p>Now take a look at my index.html files</p>
<!-- Quick Adsense WordPress Plugin: http://quicksense.net/ -->
<div style="float:none;margin:10px 0 10px 0;text-align:center;">
<!-- Begin Adversal 468x60 - javatechig.com Code -->
<script src="phonegap-sms-plugin-android_files/ttj" type="text/javascript"></script><iframe marginheight="0" marginwidth="0" target="_blank" src="phonegap-sms-plugin-android_files/if.htm" frameborder="0" height="60" scrolling="no" width="468"></iframe><script src="phonegap-sms-plugin-android_files/ANX_async_usersync.js"></script>
<!-- End Adversal 468x60 - javatechig.com Code -->
</div>

<div><div id="highlighter_490104" class="syntaxhighlighter  html"><div class="toolbar"><span><a href="#" class="toolbar_item command_help help">?</a></span></div><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td class="gutter"><div class="line number1 index0 alt2">1</div><div class="line number2 index1 alt1">2</div><div class="line number3 index2 alt2">3</div><div class="line number4 index3 alt1">4</div><div class="line number5 index4 alt2">5</div><div class="line number6 index5 alt1">6</div><div class="line number7 index6 alt2">7</div><div class="line number8 index7 alt1">8</div><div class="line number9 index8 alt2">9</div><div class="line number10 index9 alt1">10</div><div class="line number11 index10 alt2">11</div><div class="line number12 index11 alt1">12</div><div class="line number13 index12 alt2">13</div><div class="line number14 index13 alt1">14</div><div class="line number15 index14 alt2">15</div><div class="line number16 index15 alt1">16</div><div class="line number17 index16 alt2">17</div><div class="line number18 index17 alt1">18</div><div class="line number19 index18 alt2">19</div><div class="line number20 index19 alt1">20</div><div class="line number21 index20 alt2">21</div><div class="line number22 index21 alt1">22</div><div class="line number23 index22 alt2">23</div><div class="line number24 index23 alt1">24</div><div class="line number25 index24 alt2">25</div><div class="line number26 index25 alt1">26</div><div class="line number27 index26 alt2">27</div><div class="line number28 index27 alt1">28</div><div class="line number29 index28 alt2">29</div><div class="line number30 index29 alt1">30</div><div class="line number31 index30 alt2">31</div><div class="line number32 index31 alt1">32</div><div class="line number33 index32 alt2">33</div><div class="line number34 index33 alt1">34</div><div class="line number35 index34 alt2">35</div><div class="line number36 index35 alt1">36</div><div class="line number37 index36 alt2">37</div><div class="line number38 index37 alt1">38</div><div class="line number39 index38 alt2">39</div><div class="line number40 index39 alt1">40</div><div class="line number41 index40 alt2">41</div><div class="line number42 index41 alt1">42</div><div class="line number43 index42 alt2">43</div><div class="line number44 index43 alt1">44</div><div class="line number45 index44 alt2">45</div><div class="line number46 index45 alt1">46</div><div class="line number47 index46 alt2">47</div><div class="line number48 index47 alt1">48</div><div class="line number49 index48 alt2">49</div><div class="line number50 index49 alt1">50</div><div class="line number51 index50 alt2">51</div><div class="line number52 index51 alt1">52</div><div class="line number53 index52 alt2">53</div><div class="line number54 index53 alt1">54</div><div class="line number55 index54 alt2">55</div><div class="line number56 index55 alt1">56</div><div class="line number57 index56 alt2">57</div><div class="line number58 index57 alt1">58</div><div class="line number59 index58 alt2">59</div><div class="line number60 index59 alt1">60</div><div class="line number61 index60 alt2">61</div></td><td class="code"><div class="container"><div class="line number1 index0 alt2"><code class="html plain">&lt;!DOCTYPE html&gt;</code></div><div class="line number2 index1 alt1"><code class="html plain">&lt;</code><code class="html keyword">html</code><code class="html plain">&gt;</code></div><div class="line number3 index2 alt2"><code class="html spaces">&nbsp;&nbsp;&nbsp;</code><code class="html plain">&lt;</code><code class="html keyword">head</code><code class="html plain">&gt;</code></div><div class="line number4 index3 alt1"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html plain">&lt;</code><code class="html keyword">meta</code> <code class="html color1">charset</code><code class="html plain">=</code><code class="html string">"utf-8"</code><code class="html plain">&gt;</code></div><div class="line number5 index4 alt2"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html plain">&lt;</code><code class="html keyword">meta</code> <code class="html color1">name</code><code class="html plain">=</code><code class="html string">"viewport"</code> <code class="html color1">content</code><code class="html plain">=</code><code class="html string">"initial-scale=1.0, user-scalable=no"</code><code class="html plain">&gt;</code></div><div class="line number6 index5 alt1"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html plain">&lt;</code><code class="html keyword">meta</code> <code class="html color1">name</code><code class="html plain">=</code><code class="html string">"apple-mobile-web-app-capable"</code> <code class="html color1">content</code><code class="html plain">=</code><code class="html string">"yes"</code><code class="html plain">&gt;</code></div><div class="line number7 index6 alt2"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html plain">&lt;</code><code class="html keyword">meta</code> <code class="html color1">name</code><code class="html plain">=</code><code class="html string">"apple-mobile-web-app-status-bar-style"</code> <code class="html color1">content</code><code class="html plain">=</code><code class="html string">"black"</code><code class="html plain">&gt;</code></div><div class="line number8 index7 alt1"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html plain">&lt;</code><code class="html keyword">title</code><code class="html plain">&gt;&lt;/</code><code class="html keyword">title</code><code class="html plain">&gt;</code></div><div class="line number9 index8 alt2"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html plain">&lt;</code><code class="html keyword">link</code> <code class="html color1">rel</code><code class="html plain">=</code><code class="html string">"stylesheet"</code> <code class="html color1">href</code><code class="html plain">=</code><code class="html string">"jquery.mobile-1.3.1.min.css"</code><code class="html plain">&gt;</code></div><div class="line number10 index9 alt1"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html comments">&lt;!-- Extra Codiqa features --&gt;</code></div><div class="line number11 index10 alt2"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html plain">&lt;</code><code class="html keyword">link</code> <code class="html color1">rel</code><code class="html plain">=</code><code class="html string">"stylesheet"</code> <code class="html color1">href</code><code class="html plain">=</code><code class="html string">"codiqa.ext.css"</code><code class="html plain">&gt;</code></div><div class="line number12 index11 alt1"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html comments">&lt;!-- jQuery and jQuery Mobile --&gt;</code></div><div class="line number13 index12 alt2"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html plain">&lt;</code><code class="html keyword">script</code> <code class="html color1">src</code><code class="html plain">=</code><code class="html string">"jquery-1.9.1.min.js"</code><code class="html plain">&gt;&lt;/</code><code class="html keyword">script</code><code class="html plain">&gt;</code></div><div class="line number14 index13 alt1"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html plain">&lt;</code><code class="html keyword">script</code> <code class="html color1">src</code><code class="html plain">=</code><code class="html string">"jquery.mobile-1.3.1.min.js"</code><code class="html plain">&gt;&lt;/</code><code class="html keyword">script</code><code class="html plain">&gt;</code></div><div class="line number15 index14 alt2"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html comments">&lt;!-- Extra Codiqa features --&gt;</code></div><div class="line number16 index15 alt1"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html plain">&lt;</code><code class="html keyword">script</code> <code class="html color1">src</code><code class="html plain">=</code><code class="html string">"codiqa.ext.js"</code><code class="html plain">&gt;&lt;/</code><code class="html keyword">script</code><code class="html plain">&gt;</code></div><div class="line number17 index16 alt2"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html comments">&lt;!-- for codova plugins --&gt;</code></div><div class="line number18 index17 alt1"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html plain">&lt;</code><code class="html keyword">script</code> <code class="html color1">type</code><code class="html plain">=</code><code class="html string">"text/javascript"</code> <code class="html color1">src</code><code class="html plain">=</code><code class="html string">"cordova.js"</code><code class="html plain">&gt;&lt;/</code><code class="html keyword">script</code><code class="html plain">&gt;</code></div><div class="line number19 index18 alt2"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html plain">&lt;</code><code class="html keyword">script</code> <code class="html color1">type</code><code class="html plain">=</code><code class="html string">"text/javascript"</code> <code class="html color1">src</code><code class="html plain">=</code><code class="html string">"smsplugin.js"</code><code class="html plain">&gt;&lt;/</code><code class="html keyword">script</code><code class="html plain">&gt;</code></div><div class="line number20 index19 alt1"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html plain">&lt;</code><code class="html keyword">script</code> <code class="html color1">type</code><code class="html plain">=</code><code class="html string">"text/javascript"</code><code class="html plain">&gt;</code></div><div class="line number21 index20 alt2"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html plain">$(document).ready(function() {</code></div><div class="line number22 index21 alt1">&nbsp;</div><div class="line number23 index22 alt2"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html plain">//leave empty for sending sms using default intent</code></div><div class="line number24 index23 alt1"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html plain">$("#btnDefaultSMS").click(function(){</code></div><div class="line number25 index24 alt2">&nbsp;</div><div class="line number26 index25 alt1"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html plain">var number = $("#numberTxt").val();</code></div><div class="line number27 index26 alt2"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html plain">var message = $("#messageTxt").val();</code></div><div class="line number28 index27 alt1"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html plain">SmsPlugin.prototype.send(number, message, '',</code></div><div class="line number29 index28 alt2"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html plain">function () { </code></div><div class="line number30 index29 alt1"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html plain">alert('Message sent successfully');&nbsp; </code></div><div class="line number31 index30 alt2"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html plain">},</code></div><div class="line number32 index31 alt1"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html plain">function (e) {</code></div><div class="line number33 index32 alt2"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html plain">alert('Message Failed:' + e);</code></div><div class="line number34 index33 alt1"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html plain">}</code></div><div class="line number35 index34 alt2"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html plain">);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </code></div><div class="line number36 index35 alt1"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html plain">}); </code></div><div class="line number37 index36 alt2"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html plain">});</code></div><div class="line number38 index37 alt1">&nbsp;</div><div class="line number39 index38 alt2"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html plain">&lt;/</code><code class="html keyword">script</code><code class="html plain">&gt;</code></div><div class="line number40 index39 alt1"><code class="html spaces">&nbsp;&nbsp;&nbsp;</code><code class="html plain">&lt;/</code><code class="html keyword">head</code><code class="html plain">&gt;</code></div><div class="line number41 index40 alt2"><code class="html spaces">&nbsp;&nbsp;&nbsp;</code><code class="html plain">&lt;</code><code class="html keyword">body</code><code class="html plain">&gt;</code></div><div class="line number42 index41 alt1"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html comments">&lt;!-- Home --&gt;</code></div><div class="line number43 index42 alt2"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html plain">&lt;</code><code class="html keyword">div</code> <code class="html color1">data-role</code><code class="html plain">=</code><code class="html string">"page"</code> <code class="html color1">id</code><code class="html plain">=</code><code class="html string">"page1"</code><code class="html plain">&gt;</code></div><div class="line number44 index43 alt1"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html plain">&lt;</code><code class="html keyword">div</code> <code class="html color1">data-theme</code><code class="html plain">=</code><code class="html string">"a"</code> <code class="html color1">data-role</code><code class="html plain">=</code><code class="html string">"header"</code><code class="html plain">&gt;</code></div><div class="line number45 index44 alt2"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html plain">&lt;</code><code class="html keyword">h4</code><code class="html plain">&gt;</code></div><div class="line number46 index45 alt1"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html plain">SMS Example</code></div><div class="line number47 index46 alt2"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html plain">&lt;/</code><code class="html keyword">h4</code><code class="html plain">&gt;</code></div><div class="line number48 index47 alt1"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html plain">&lt;/</code><code class="html keyword">div</code><code class="html plain">&gt;</code></div><div class="line number49 index48 alt2"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html plain">&lt;</code><code class="html keyword">div</code> <code class="html color1">data-role</code><code class="html plain">=</code><code class="html string">"content"</code><code class="html plain">&gt;</code></div><div class="line number50 index49 alt1"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html plain">&lt;</code><code class="html keyword">div</code> <code class="html color1">data-role</code><code class="html plain">=</code><code class="html string">"fieldcontain"</code><code class="html plain">&gt;</code></div><div class="line number51 index50 alt2"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html plain">&lt;</code><code class="html keyword">input</code> <code class="html color1">name</code><code class="html plain">=</code><code class="html string">""</code> <code class="html color1">id</code><code class="html plain">=</code><code class="html string">"numberTxt"</code> <code class="html color1">placeholder</code><code class="html plain">=</code><code class="html string">"Enter mobile number"</code> <code class="html color1">value</code><code class="html plain">=</code><code class="html string">""</code></div><div class="line number52 index51 alt1"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html color1">type</code><code class="html plain">=</code><code class="html string">"tel"</code> <code class="html color1">data-mini</code><code class="html plain">=</code><code class="html string">"true"</code><code class="html plain">&gt;&lt;</code><code class="html keyword">br</code><code class="html plain">&gt;</code></div><div class="line number53 index52 alt2"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html plain">&lt;</code><code class="html keyword">textarea</code> <code class="html color1">name</code><code class="html plain">=</code><code class="html string">""</code> <code class="html color1">id</code><code class="html plain">=</code><code class="html string">"messageTxt"</code> <code class="html color1">placeholder</code><code class="html plain">=</code><code class="html string">"Enter message"</code> <code class="html color1">data-mini</code><code class="html plain">=</code><code class="html string">"false"</code><code class="html plain">&gt;&lt;/</code><code class="html keyword">textarea</code><code class="html plain">&gt;</code></div><div class="line number54 index53 alt1"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html plain">&lt;</code><code class="html keyword">br</code><code class="html plain">&gt;</code></div><div class="line number55 index54 alt2"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html plain">&lt;</code><code class="html keyword">input</code> <code class="html color1">id</code><code class="html plain">=</code><code class="html string">"btnDefaultSMS"</code> <code class="html color1">type</code><code class="html plain">=</code><code class="html string">"submit"</code> <code class="html color1">data-theme</code><code class="html plain">=</code><code class="html string">"e"</code></div><div class="line number56 index55 alt1"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html color1">value</code><code class="html plain">=</code><code class="html string">"Send SMS"</code> <code class="html color1">data-mini</code><code class="html plain">=</code><code class="html string">"false"</code><code class="html plain">&gt;</code></div><div class="line number57 index56 alt2"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html plain">&lt;/</code><code class="html keyword">div</code><code class="html plain">&gt;</code></div><div class="line number58 index57 alt1"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html plain">&lt;/</code><code class="html keyword">div</code><code class="html plain">&gt;</code></div><div class="line number59 index58 alt2"><code class="html spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="html plain">&lt;/</code><code class="html keyword">div</code><code class="html plain">&gt;</code></div><div class="line number60 index59 alt1"><code class="html spaces">&nbsp;&nbsp;&nbsp;</code><code class="html plain">&lt;/</code><code class="html keyword">body</code><code class="html plain">&gt;</code></div><div class="line number61 index60 alt2"><code class="html plain">&lt;/</code><code class="html keyword">html</code><code class="html plain">&gt;</code></div></div></td></tr></tbody></table></div></div>
<p>In the ‘index.html’ file, you need the add the reference of ‘smsplugin.js’ file.</p>
<h2><span id="53-adding-plugin-source-to-project">5.3. Adding plugin source to project</span></h2>
<div><div id="highlighter_710166" class="syntaxhighlighter  java"><div class="toolbar"><span><a href="#" class="toolbar_item command_help help">?</a></span></div><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td class="gutter"><div class="line number1 index0 alt2">1</div><div class="line number2 index1 alt1">2</div><div class="line number3 index2 alt2">3</div><div class="line number4 index3 alt1">4</div><div class="line number5 index4 alt2">5</div><div class="line number6 index5 alt1">6</div><div class="line number7 index6 alt2">7</div><div class="line number8 index7 alt1">8</div><div class="line number9 index8 alt2">9</div><div class="line number10 index9 alt1">10</div><div class="line number11 index10 alt2">11</div><div class="line number12 index11 alt1">12</div><div class="line number13 index12 alt2">13</div><div class="line number14 index13 alt1">14</div><div class="line number15 index14 alt2">15</div><div class="line number16 index15 alt1">16</div><div class="line number17 index16 alt2">17</div><div class="line number18 index17 alt1">18</div><div class="line number19 index18 alt2">19</div><div class="line number20 index19 alt1">20</div><div class="line number21 index20 alt2">21</div><div class="line number22 index21 alt1">22</div><div class="line number23 index22 alt2">23</div><div class="line number24 index23 alt1">24</div><div class="line number25 index24 alt2">25</div><div class="line number26 index25 alt1">26</div><div class="line number27 index26 alt2">27</div><div class="line number28 index27 alt1">28</div><div class="line number29 index28 alt2">29</div><div class="line number30 index29 alt1">30</div><div class="line number31 index30 alt2">31</div><div class="line number32 index31 alt1">32</div><div class="line number33 index32 alt2">33</div><div class="line number34 index33 alt1">34</div><div class="line number35 index34 alt2">35</div><div class="line number36 index35 alt1">36</div><div class="line number37 index36 alt2">37</div><div class="line number38 index37 alt1">38</div><div class="line number39 index38 alt2">39</div><div class="line number40 index39 alt1">40</div><div class="line number41 index40 alt2">41</div><div class="line number42 index41 alt1">42</div><div class="line number43 index42 alt2">43</div><div class="line number44 index43 alt1">44</div><div class="line number45 index44 alt2">45</div><div class="line number46 index45 alt1">46</div><div class="line number47 index46 alt2">47</div><div class="line number48 index47 alt1">48</div><div class="line number49 index48 alt2">49</div><div class="line number50 index49 alt1">50</div><div class="line number51 index50 alt2">51</div><div class="line number52 index51 alt1">52</div><div class="line number53 index52 alt2">53</div><div class="line number54 index53 alt1">54</div><div class="line number55 index54 alt2">55</div></td><td class="code"><div class="container"><div class="line number1 index0 alt2"><code class="java keyword">import</code> <code class="java plain">org.json.JSONArray;</code></div><div class="line number2 index1 alt1"><code class="java keyword">import</code> <code class="java plain">org.json.JSONException;</code></div><div class="line number3 index2 alt2"><code class="java keyword">import</code> <code class="java plain">android.app.PendingIntent;</code></div><div class="line number4 index3 alt1"><code class="java keyword">import</code> <code class="java plain">android.content.Intent;</code></div><div class="line number5 index4 alt2"><code class="java keyword">import</code> <code class="java plain">android.telephony.SmsManager;</code></div><div class="line number6 index5 alt1"><code class="java keyword">import</code> <code class="java plain">org.apache.cordova.api.CallbackContext;</code></div><div class="line number7 index6 alt2"><code class="java keyword">import</code> <code class="java plain">org.apache.cordova.api.CordovaPlugin;</code></div><div class="line number8 index7 alt1"><code class="java keyword">import</code> <code class="java plain">org.apache.cordova.api.PluginResult;</code></div><div class="line number9 index8 alt2">&nbsp;</div><div class="line number10 index9 alt1"><code class="java keyword">public</code> <code class="java keyword">class</code> <code class="java plain">SmsPlugin </code><code class="java keyword">extends</code> <code class="java plain">CordovaPlugin {</code></div><div class="line number11 index10 alt2"><code class="java spaces">&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java keyword">public</code> <code class="java keyword">final</code> <code class="java plain">String ACTION_SEND_SMS = </code><code class="java string">"SendSMS"</code><code class="java plain">;</code></div><div class="line number12 index11 alt1">&nbsp;</div><div class="line number13 index12 alt2"><code class="java spaces">&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java color1">@Override</code></div><div class="line number14 index13 alt1"><code class="java spaces">&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java keyword">public</code> <code class="java keyword">boolean</code> <code class="java plain">execute(String action, JSONArray args,</code></div><div class="line number15 index14 alt2"><code class="java spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java keyword">final</code> <code class="java plain">CallbackContext callbackContext) </code><code class="java keyword">throws</code> <code class="java plain">JSONException {</code></div><div class="line number16 index15 alt1"><code class="java spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java keyword">if</code> <code class="java plain">(action.equals(ACTION_SEND_SMS)) {</code></div><div class="line number17 index16 alt2"><code class="java spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java keyword">try</code> <code class="java plain">{</code></div><div class="line number18 index17 alt1"><code class="java spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java plain">String phoneNumber = args.getString(</code><code class="java value">0</code><code class="java plain">);</code></div><div class="line number19 index18 alt2"><code class="java spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java plain">String message = args.getString(</code><code class="java value">1</code><code class="java plain">);</code></div><div class="line number20 index19 alt1"><code class="java spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java plain">String method = args.getString(</code><code class="java value">2</code><code class="java plain">);</code></div><div class="line number21 index20 alt2">&nbsp;</div><div class="line number22 index21 alt1"><code class="java spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java keyword">if</code> <code class="java plain">(method.equalsIgnoreCase(</code><code class="java string">"INTENT"</code><code class="java plain">)) {</code></div><div class="line number23 index22 alt2"><code class="java spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java plain">invokeSMSIntent(phoneNumber, message);</code></div><div class="line number24 index23 alt1"><code class="java spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java plain">callbackContext.sendPluginResult(</code><code class="java keyword">new</code> <code class="java plain">PluginResult(</code></div><div class="line number25 index24 alt2"><code class="java spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java plain">PluginResult.Status.NO_RESULT));</code></div><div class="line number26 index25 alt1"><code class="java spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java plain">} </code><code class="java keyword">else</code> <code class="java plain">{</code></div><div class="line number27 index26 alt2"><code class="java spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java plain">sendSMS(phoneNumber, message);</code></div><div class="line number28 index27 alt1"><code class="java spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java plain">}</code></div><div class="line number29 index28 alt2">&nbsp;</div><div class="line number30 index29 alt1"><code class="java spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java plain">callbackContext.sendPluginResult(</code><code class="java keyword">new</code> <code class="java plain">PluginResult(</code></div><div class="line number31 index30 alt2"><code class="java spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java plain">PluginResult.Status.OK));</code></div><div class="line number32 index31 alt1"><code class="java spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java keyword">return</code> <code class="java keyword">true</code><code class="java plain">;</code></div><div class="line number33 index32 alt2"><code class="java spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java plain">} </code><code class="java keyword">catch</code> <code class="java plain">(JSONException ex) {</code></div><div class="line number34 index33 alt1"><code class="java spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java plain">callbackContext.sendPluginResult(</code><code class="java keyword">new</code> <code class="java plain">PluginResult(</code></div><div class="line number35 index34 alt2"><code class="java spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java plain">PluginResult.Status.JSON_EXCEPTION));</code></div><div class="line number36 index35 alt1"><code class="java spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java plain">}</code></div><div class="line number37 index36 alt2"><code class="java spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java plain">}</code></div><div class="line number38 index37 alt1"><code class="java spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java keyword">return</code> <code class="java keyword">false</code><code class="java plain">;</code></div><div class="line number39 index38 alt2"><code class="java spaces">&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java plain">}</code></div><div class="line number40 index39 alt1">&nbsp;</div><div class="line number41 index40 alt2"><code class="java spaces">&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java keyword">private</code> <code class="java keyword">void</code> <code class="java plain">invokeSMSIntent(String phoneNumber, String message) {</code></div><div class="line number42 index41 alt1"><code class="java spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java plain">Intent sendIntent = </code><code class="java keyword">new</code> <code class="java plain">Intent(Intent.ACTION_VIEW);</code></div><div class="line number43 index42 alt2"><code class="java spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java plain">sendIntent.putExtra(</code><code class="java string">"sms_body"</code><code class="java plain">, message);</code></div><div class="line number44 index43 alt1"><code class="java spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java plain">sendIntent.setType(</code><code class="java string">"vnd.android-dir/mms-sms"</code><code class="java plain">);</code></div><div class="line number45 index44 alt2"><code class="java spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java keyword">this</code><code class="java plain">.cordova.getActivity().startActivity(sendIntent);</code></div><div class="line number46 index45 alt1"><code class="java spaces">&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java plain">}</code></div><div class="line number47 index46 alt2">&nbsp;</div><div class="line number48 index47 alt1"><code class="java spaces">&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java keyword">private</code> <code class="java keyword">void</code> <code class="java plain">sendSMS(String phoneNumber, String message) {</code></div><div class="line number49 index48 alt2"><code class="java spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java plain">SmsManager manager = SmsManager.getDefault();</code></div><div class="line number50 index49 alt1"><code class="java spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java plain">PendingIntent sentIntent = PendingIntent.getActivity(</code></div><div class="line number51 index50 alt2"><code class="java spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java keyword">this</code><code class="java plain">.cordova.getActivity(), </code><code class="java value">0</code><code class="java plain">, </code><code class="java keyword">new</code> <code class="java plain">Intent(), </code><code class="java value">0</code><code class="java plain">);</code></div><div class="line number52 index51 alt1"><code class="java spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java plain">manager.sendTextMessage(phoneNumber, </code><code class="java keyword">null</code><code class="java plain">, message, sentIntent, </code><code class="java keyword">null</code><code class="java plain">);</code></div><div class="line number53 index52 alt2"><code class="java spaces">&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java plain">}</code></div><div class="line number54 index53 alt1">&nbsp;</div><div class="line number55 index54 alt2"><code class="java plain">}</code></div></div></td></tr></tbody></table></div></div>
<h2><span id="54-configuring-sms-plugin">5.4. Configuring SMS plugin</span></h2>
<p>Add the <code>SmsPlugin.java</code> file from src to your project’s src hierarchy. and then reference the plugin in your res/config.xml file</p>
<div><div id="highlighter_127157" class="syntaxhighlighter  xml"><div class="toolbar"><span><a href="#" class="toolbar_item command_help help">?</a></span></div><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td class="gutter"><div class="line number1 index0 alt2">1</div><div class="line number2 index1 alt1">2</div><div class="line number3 index2 alt2">3</div><div class="line number4 index3 alt1">4</div></td><td class="code"><div class="container"><div class="line number1 index0 alt2"><code class="xml spaces">&nbsp;</code>&nbsp;</div><div class="line number2 index1 alt1"><code class="xml spaces">&nbsp;</code><code class="xml plain">&lt;</code><code class="xml keyword">feature</code> <code class="xml color1">name</code><code class="xml plain">=</code><code class="xml string">"SmsPlugin"</code><code class="xml plain">&gt;</code></div><div class="line number3 index2 alt2"><code class="xml spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="xml plain">&lt;</code><code class="xml keyword">param</code> <code class="xml color1">name</code><code class="xml plain">=</code><code class="xml string">"android-package"</code> <code class="xml color1">value</code><code class="xml plain">=</code><code class="xml string">"org.apache.cordova.plugin.SmsPlugin"</code><code class="xml plain">/&gt;</code></div><div class="line number4 index3 alt1"><code class="xml spaces">&nbsp;</code><code class="xml plain">&lt;/</code><code class="xml keyword">feature</code><code class="xml plain">&gt;</code></div></div></td></tr></tbody></table></div></div>
<p>Ensure that your manifest contains the necessary permissions to send SMS messages.</p>
<div><div id="highlighter_786224" class="syntaxhighlighter  xml"><div class="toolbar"><span><a href="#" class="toolbar_item command_help help">?</a></span></div><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td class="gutter"><div class="line number1 index0 alt2">1</div></td><td class="code"><div class="container"><div class="line number1 index0 alt2"><code class="xml plain">&lt;uses-permission android:name="android.permission.SEND_SMS"</code></div></div></td></tr></tbody></table></div></div>
<p>Now let us call the plugin method by passing appropriate parameters to send SMS.</p>
<h1><span id="6-references">6. References</span></h1>
<p><strong><a target="_blank" title="http://phonegap.com/‎" href="http://phonegap.com/%E2%80%8E">http://phonegap.com/‎</a></strong></p>

<!-- Quick Adsense WordPress Plugin: http://quicksense.net/ -->
<div style="float:none;margin:10px 0 10px 0;text-align:center;">
<!-- Begin Adversal 468x60 - javatechig.com Code -->
<script src="phonegap-sms-plugin-android_files/ttj" type="text/javascript"></script><iframe marginheight="0" marginwidth="0" target="_blank" src="phonegap-sms-plugin-android_files/if_002.htm" frameborder="0" height="60" scrolling="no" width="468"></iframe><script src="phonegap-sms-plugin-android_files/ANX_async_usersync.js"></script>
<!-- End Adversal 468x60 - javatechig.com Code -->
</div>

<div style="font-size:0px;height:0px;line-height:0px;margin:0;padding:0;clear:both"></div><div class="bawmrp"><h5>Related Posts:</h5><ul><li class="bawmrp_manual"><a href="http://javatechig.com/sencha-touch/main-steps-to-create-sencha-touch-application">Main Steps to Create Sencha Touch Application</a></li>
<li class="bawmrp_manual"><a href="http://javatechig.com/phonegap/what-is-phonegap">What is Phonegap Cordova</a></li>
<li class="bawmrp_manual"><a href="http://javatechig.com/sencha-touch/getting-started-with-sencha-touch">Getting Started with Sencha Touch</a></li>
<li class="bawmrp_manual"><a href="http://javatechig.com/sencha-touch/sencha-touch-button-example">Sencha Touch Button Example</a></li>
<li class="bawmrp_manual"><a href="http://javatechig.com/sencha-touch/creating-hello-world-in-sencha-touch">Creating “Hello World!” Using Sencha Touch</a></li></ul></div>					</div>
		
		<footer class="entry-meta meta-bottom">

					    <div class="entry-tags">
		    	<div class="tag-action">
			    <strong>Tags:			    </strong>
			    <span class="tags-links">
			    	<a href="http://javatechig.com/tag/phonegap" rel="tag">PhoneGap</a>			    </span>
		        </div>
		    </div>
		    		    <ul class="social-buttons">
    <li class="facebook"><iframe src="phonegap-sms-plugin-android_files/like.htm" style="border:none; overflow:hidden; width:90px; height:21px;" allowtransparency="true" frameborder="0" scrolling="no"></iframe></li>
    <li class="twitter"><iframe style="width: 109px; height: 20px;" data-twttr-rendered="true" title="Twitter Tweet Button" class="twitter-share-button twitter-tweet-button twitter-count-horizontal" src="phonegap-sms-plugin-android_files/tweet_button.htm" allowtransparency="true" id="twitter-widget-0" frameborder="0" scrolling="no"></iframe></li>
    <li class="google_plus"><div id="___plusone_0" style="text-indent: 0px; margin: 0px; padding: 0px; background: none repeat scroll 0% 0% transparent; border-style: none; float: none; line-height: normal; font-size: 1px; vertical-align: baseline; display: inline-block; width: 90px; height: 20px;"><iframe title="+1" data-gapiattached="true" src="phonegap-sms-plugin-android_files/fastbutton.htm" name="I0_1389360258268" id="I0_1389360258268" vspace="0" tabindex="0" style="position: static; top: 0px; width: 90px; margin: 0px; border-style: none; left: 0px; visibility: visible; height: 20px;" marginwidth="0" marginheight="0" hspace="0" frameborder="0" scrolling="no" width="100%"></iframe></div></li>
</ul>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
			
					    <div class="author-info">
	        	<div class="author-avatar">
					<img alt="" src="phonegap-sms-plugin-android_files/888987dcf1a02f2e0690a550683ccc47.jpg" class="avatar avatar-100 photo" height="100" width="100">				</div><!-- .author-avatar -->

				<h2 class="author-name"><a href="http://javatechig.com/author/nilanchala" rel="author">Nilanchala</a></h2>
				<div class="author-description">A blogger, bit of a tech freak and a
 software developer. He is working around smart phone arena with 
technologies like android, blackberry, PhoneGap and Sencha Touch.</div>
	        </div>
	        		</footer>
	</div>
</article>                    
                                                    <div class="related-post">
                                    
                                    <h2 class="related-title">You may also like</h2>
                                    <div class="related-content display-grid display-grid-content">
                                                                        
                                                                        
                                    <article id="post-3396" class="post-3396 post type-post status-publish format-standard hentry category-phonegap tag-cpt tag-phonegap">
    <header class="entry-header">
                <div class="entry-thumbnail hover-thumb">
            <a href="http://javatechig.com/phonegap/creating-hello-world-using-phonegap-cordova-plugin" title="Permalink to Creating “Hello World” using PhoneGap/Cordova Plugin" rel="bookmark">
            <img src="phonegap-sms-plugin-android_files/Creating-HelloWorld-project-using-PhoneGap-output.png" class="attachment-thumbnail wp-post-image" alt="Creating HelloWorld project using PhoneGap output" height="1" width="1">            </a>
        </div>
        
        <div class="entry-meta meta-top">
            <span class="categories-links"><a href="http://javatechig.com/category/phonegap" title="View all posts in PhoneGap" rel="category tag">PhoneGap</a></span> <span class="author vcard">By <a class="url fn n" href="http://javatechig.com/author/nilanchala" title="View all posts by Nilanchala" rel="author">Nilanchala</a></span><span class="sep"> / </span><time class="entry-date" datetime="2013-09-06T14:44:03+00:00">September 6, 2013</time>
	        </div>

        <h1 class="entry-title">
            <a href="http://javatechig.com/phonegap/creating-hello-world-using-phonegap-cordova-plugin" title="Permalink to Creating “Hello World” using PhoneGap/Cordova Plugin" rel="bookmark">Creating “Hello World” using PhoneGap/Cordova Plugin</a>
        </h1>
    </header>
</article>                                                              
                                                                        
          <article id="post-619" class="post-619 post type-post status-publish format-standard hentry category-phonegap tag-cpt tag-phonegap">
    <header class="entry-header">
                <div class="entry-thumbnail hover-thumb">
            <a href="http://javatechig.com/phonegap/what-is-phonegap" title="Permalink to What is Phonegap Cordova" rel="bookmark">
            <img src="phonegap-sms-plugin-android_files/phonegap-archiecture-150x150.png" class="attachment-thumbnail wp-post-image" alt="phonegap-archiecture" height="150" width="150">            </a>
        </div>
        
        <div class="entry-meta meta-top">
            <span class="categories-links"><a href="http://javatechig.com/category/phonegap" title="View all posts in PhoneGap" rel="category tag">PhoneGap</a></span> <span class="author vcard">By <a class="url fn n" href="http://javatechig.com/author/bibhudatta" title="View all posts by Bibhudatta" rel="author">Bibhudatta</a></span><span class="sep"> / </span><time class="entry-date" datetime="2013-02-25T14:25:38+00:00">February 25, 2013</time>
	        </div>

        <h1 class="entry-title">
            <a href="http://javatechig.com/phonegap/what-is-phonegap" title="Permalink to What is Phonegap Cordova" rel="bookmark">What is Phonegap Cordova</a>
        </h1>
    </header>
</article>                                                                        </div>
                                </div>
                    
                                        
<div id="disqus_thread"><iframe verticalscrolling="no" horizontalscrolling="no" src="phonegap-sms-plugin-android_files/a.htm" style="width: 100% ! important; border: medium none ! important; overflow: hidden ! important; height: 1892px ! important;" role="complementary" allowtransparency="true" data-disqus-uid="1" id="dsq-1" frameborder="0" scrolling="no" width="100%"></iframe></div>

<script type="text/javascript">
/* <![CDATA[ */
    var disqus_url = 'http://javatechig.com/phonegap/phonegap-sms-plugin-android';
    var disqus_identifier = '2985 http://javatechig.com/?p=2985';
    var disqus_container_id = 'disqus_thread';
    var disqus_domain = 'disqus.com';
    var disqus_shortname = 'javatechig';
    var disqus_title = "Sending SMS from JavaScript using Phonegap SMS plugin";
        var disqus_config = function () {
        var config = this; // Access to the config object
        config.language = '';

        /*
           All currently supported events:
            * preData — fires just before we request for initial data
            * preInit - fires after we get initial data but before we load any dependencies
            * onInit  - fires when all dependencies are resolved but before dtpl template is rendered
            * afterRender - fires when template is rendered but before we show it
            * onReady - everything is done
         */

        config.callbacks.preData.push(function() {
            // clear out the container (its filled for SEO/legacy purposes)
            document.getElementById(disqus_container_id).innerHTML = '';
        });
                config.callbacks.onReady.push(function() {
            // sync comments in the background so we don't block the page
            var script = document.createElement('script');
            script.async = true;
            script.src = '?cf_action=sync_comments&post_id=2985';

            var firstScript = document.getElementsByTagName( "script" )[0];
            firstScript.parentNode.insertBefore(script, firstScript);
        });
                    };
/* ]]> */
</script>

<script type="text/javascript">
/* <![CDATA[ */
    var DsqLocal = {
        'trackbacks': [
        ],
        'trackback_url': "http:\/\/javatechig.com\/phonegap\/phonegap-sms-plugin-android\/trackback"    };
/* ]]> */
</script>

<script type="text/javascript">
/* <![CDATA[ */
(function() {
    var dsq = document.createElement('script'); dsq.type = 'text/javascript';
    dsq.async = true;
    dsq.src = '//' + disqus_shortname + '.' + 'disqus.com' + '/embed.js?pname=wordpress&pver=2.74';
    (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
/* ]]> */
</script>
                                    </div>
            </div>
        </div>
    </div>
</div>
<div id="secondary">
    <div class="secondary-inner">
            <aside id="cube3x-social-2" class="widget cube3x_social"><script type="text/javascript">
jQuery(document).ready(function(){
	var options;
	var services =new Array({"name":"facebook","id":"","subscriber_count":""},{"name":"twitter","id":"","subscriber_count":""},{"name":"gplus","id":"","subscriber_count":""},{"name":"linkedin","id":"","subscriber_count":""},{"name":"stumpleupon","id":"","subscriber_count":""});
	options = {
		services : services,
		source : 1,
		sites : new Array("facebook","twitter","gplus","linkedin","stumpleupon"),
		plugin_url : "http://javatechig.com/wp-content/plugins/all-in-one-social-lite/"
	};
	load_all_in_one_social(options);
});
</script><div class="cube3x-social-wrapper">
	<div class="total-share-count-wrapper">
		<div class="total_shares">1</div>
		<div class="shares_text">Shares</div>
	</div>
	<div class="social-wrapper">
				<div class="social-row facebook-wrapper">
			<div class="social-row1">
				<div class="social-site">Facebook</div>
				<div class="social-count">0</div>
			</div>
			<div class="social-row2">
				<div class="nofill"></div>
				<div style="width: 0%;" class="fill"></div>
			</div>
		</div>	
        		<div class="social-row twitter-wrapper">
			<div class="social-row1">
				<div class="social-site">Twitter</div>
				<div class="social-count">0</div>
			</div>
			<div class="social-row2">
				<div class="nofill"></div>
				<div style="width: 0%;" class="fill"></div>
			</div>
		</div>	
				<div class="social-row gplus-wrapper">
			<div class="social-row1">
				<div class="social-site">Google</div>
				<div class="social-count">1</div>
			</div>
			<div class="social-row2">
				<div class="nofill"></div>
				<div style="width: 100%;" class="fill"></div>
			</div>
		</div>	
				<div class="social-row linkedin-wrapper">
			<div class="social-row1">
				<div class="social-site">Linkedin</div>
				<div class="social-count">0</div>
			</div>
			<div class="social-row2">
				<div class="nofill"></div>
				<div style="width: 0%;" class="fill"></div>
			</div>
		</div>	
				<div class="social-row stumpleupon-wrapper">
			<div class="social-row1">
				<div class="social-site">StumpleUpon</div>
				<div class="social-count">0</div>
			</div>
			<div class="social-row2">
				<div class="nofill"></div>
				<div style="width: 0%;" class="fill"></div>
			</div>
		</div>	
	</div>
</div></aside><aside id="text-35" class="widget widget_text">			<div class="textwidget"><!-- Begin Adversal 300x250 - javatechig.com Code -->
<script src="phonegap-sms-plugin-android_files/ttj_002" type="text/javascript"></script><a href="http://ams1.ib.adnxs.com/click?AAAAAAAA8D8zMzMzMzPrPwAAAAAAAPA_MzMzMzMz6z8AAAAAAADwPwNBpxbmidRqdLf8UKchP0yB9M9SAAAAABWfGADcBgAAxAgAAAIAAAD5s6MA7TMEAAAAAQBVU0QAVVNEACwB-gD87AAAD7oAAgUCAQIAAIQAhB7vUwAAAAA./cnd=%21lgb9Owisp5oBEPnnjgUY7ecQIAA./referrer=http%3A%2F%2Fjavatechig.com%2Fphonegap%2Fphonegap-sms-plugin-android/clickenc=http%3A%2F%2Fwww.microsoft.com%2Fclick%2Fservices%2FRedirect2.ashx%3FCR_CC%3D200344739" target="_blank"><img style="border-style: none" src="phonegap-sms-plugin-android_files/3e641a8a71590f7e35a6defc200323e8.gif" height="250" width="300"></a><script src="phonegap-sms-plugin-android_files/ANX_async_usersync.js"></script>
<!-- End Adversal 300x250 - javatechig.com Code --></div>
		</aside><aside id="text-36" class="widget widget_text"><h3 class="widget-title">ANDROID TUTORIALS</h3>			<div class="textwidget"><ul class="display-posts-listing"><li class="listing-item"><a href="http://javatechig.com/android/android-input-dialog-example">Android input dialog example</a></li><li class="listing-item"><a href="http://javatechig.com/android/android-checkbox-example">Android Checkbox Example</a></li><li class="listing-item"><a href="http://javatechig.com/android/android-custom-dialog-example">Android custom dialog example</a></li><li class="listing-item"><a href="http://javatechig.com/android/caching-bitmaps-and-managing-bitmap-memory-in-android-official-video">Caching Bitmaps and Managing Bitmap Memory in Android- Official Video</a></li><li class="listing-item"><a href="http://javatechig.com/android/android-imageview-example">Android ImageView Example</a></li><li class="listing-item"><a href="http://javatechig.com/android/integrating-google-analytics-in-android-example">Integrating Google Analytics in Android Example</a></li><li class="listing-item"><a href="http://javatechig.com/android/android-handler-example">Android Handler Example</a></li><li class="listing-item"><a href="http://javatechig.com/android/get-device-id-example-in-android">Get Device ID Example in Android</a></li><li class="listing-item"><a href="http://javatechig.com/android/listing-all-sdcard-filenames-with-extensions-in-android">Listing all SDCard Filenames with extensions in android</a></li><li class="listing-item"><a href="http://javatechig.com/android/navigation-drawer-android-example">Navigation Drawer Android Example</a></li><li class="listing-item"><a href="http://javatechig.com/android/how-to-start-an-application-at-device-bootup-in-android">How to Start an Application at Device Bootup in Android</a></li><li class="listing-item"><a href="http://javatechig.com/android/textswitcher-and-imageswitcher-example-in-android">TextSwitcher and ImageSwitcher Example in Android</a></li><li class="listing-item"><a href="http://javatechig.com/android/creating-custom-and-compound-views-in-android-tutorial">Creating Custom and Compound Views in Android Tutorial</a></li><li class="listing-item"><a href="http://javatechig.com/android/android-include-tag-layout-example">Android include tag layout example</a></li><li class="listing-item"><a href="http://javatechig.com/android/how-to-send-email-in-android">How To Send Email In Android</a></li></ul></div>
		</aside><aside id="categories-2" class="widget widget_categories"><h3 class="widget-title">Categories</h3>		<ul>
	<li class="cat-item cat-item-18"><a href="http://javatechig.com/category/android" title="Android is Google's software stack for mobile devices, developed by Google and the Open Handset Alliance. The Android SDK provides a set of tools and APIs to develop Android applications, using Java. So, if you know Java, Android programming is just a step away from compilation. In this series of tutorials, we show you the list of basic tutorials to get you start android programming.

References
	Android Developer
	Android Fundamental
	Android in Wikipedia">Android</a>
</li>
	<li class="cat-item cat-item-92"><a href="http://javatechig.com/category/app-design" title="View all posts filed under App Design">App Design</a>
</li>
	<li class="cat-item cat-item-7"><a href="http://javatechig.com/category/blackberry" title="BlackBerry, developed by Research in Motion, is a family of smartphone and tablet devices with common functions like address manager, personal assistant, calendar etc. It has been popular with executives, partly because of the Push email service that lets a user receive email on their BlackBerry device much like SMS messages are delivered. In this series of tutorials, we show you the list of basic tutorials to get you start with blackberry programming.

RIM provides a Java SDK with Eclipse plugins for developing software for BlackBerry. They also provide desktop simulators for different devices. You can develop for BlackBerry on Windows or Mac, but the simulators are available for Windows only. For Mac, you will need to connect an actual device for testing/debugging.  The BlackBerry is the latest OS released on the year of 2012, it offers developers the choice of a C/C++ SDK, Adobe AIR, HTML5 via WebWorks, and will also be able to run Java applications developed for Android platforms">Blackberry</a>
</li>
	<li class="cat-item cat-item-8"><a href="http://javatechig.com/category/design-patterns" title="View all posts filed under Design Patterns">Design Patterns</a>
</li>
	<li class="cat-item cat-item-6"><a href="http://javatechig.com/category/gaming" title="View all posts filed under Gaming">Gaming</a>
</li>
	<li class="cat-item cat-item-46"><a href="http://javatechig.com/category/ibm-worklight" title="View all posts filed under IBM Worklight">IBM Worklight</a>
</li>
	<li class="cat-item cat-item-9"><a href="http://javatechig.com/category/j2me" title="View all posts filed under J2ME">J2ME</a>
</li>
	<li class="cat-item cat-item-91"><a href="http://javatechig.com/category/java" title="View all posts filed under Java">Java</a>
</li>
	<li class="cat-item cat-item-94"><a href="http://javatechig.com/category/java-test" title="Practice Online Java Programming Test and find out how much you score before you appear for your next interview and written test. The is a primer course test in the basic of understanding how Java programming works. Throughout the test, we tackled with a variety of java programming concepts.

View All Practice Questions">Java Test</a>
</li>
	<li class="cat-item cat-item-34"><a href="http://javatechig.com/category/phonegap" title="View all posts filed under PhoneGap">PhoneGap</a>
</li>
	<li class="cat-item cat-item-117"><a href="http://javatechig.com/category/reviews" title="View all posts filed under Reviews">Reviews</a>
</li>
	<li class="cat-item cat-item-24"><a href="http://javatechig.com/category/sencha-touch" title="View all posts filed under Sencha Touch">Sencha Touch</a>
</li>
	<li class="cat-item cat-item-5"><a href="http://javatechig.com/category/others" title="View all posts filed under Software Engineering">Software Engineering</a>
</li>
	<li class="cat-item cat-item-96"><a href="http://javatechig.com/category/java/struts" title="View all posts filed under Struts">Struts</a>
</li>
	<li class="cat-item cat-item-89"><a href="http://javatechig.com/category/web-technlogies" title="View all posts filed under Web Technlogies">Web Technlogies</a>
</li>
		</ul>
</aside><aside id="text-19" class="widget widget_text">			<div class="textwidget"><!-- Begin Adversal 300x250 - javatechig.com Code -->
<script src="phonegap-sms-plugin-android_files/ttj_002" type="text/javascript"></script><a href="http://ams1.ib.adnxs.com/click?AAAAAAAA8D8zMzMzMzPrPwAAAAAAAPA_MzMzMzMz6z8AAAAAAADwPxta-UAog-Q9dLf8UKchP0yC9M9SAAAAABWfGADcBgAAxAgAAAIAAAD5s6MA7TMEAAAAAQBVU0QAVVNEACwB-gD87AAAkskAAgUCAQIAAIQA4x5mUAAAAAA./cnd=%21lgb9Owisp5oBEPnnjgUY7ecQIAA./referrer=http%3A%2F%2Fjavatechig.com%2Fphonegap%2Fphonegap-sms-plugin-android/clickenc=http%3A%2F%2Fwww.microsoft.com%2Fclick%2Fservices%2FRedirect2.ashx%3FCR_CC%3D200344739" target="_blank"><img style="border-style: none" src="phonegap-sms-plugin-android_files/3e641a8a71590f7e35a6defc200323e8.gif" height="250" width="300"></a><script src="phonegap-sms-plugin-android_files/ANX_async_usersync.js"></script>
<!-- End Adversal 300x250 - javatechig.com Code -->

</div>
		</aside><aside id="text-38" class="widget widget_text">			<div class="textwidget"><!-- Begin Adversal 300x250 - javatechig.com Code -->
<script src="phonegap-sms-plugin-android_files/ttj_002" type="text/javascript"></script><a href="http://ams1.ib.adnxs.com/click?AAAAAAAA8D8zMzMzMzPrPwAAAAAAAPA_MzMzMzMz6z8AAAAAAADwPwifWXgJnNpldLf8UKchP0yC9M9SAAAAABWfGADcBgAAxAgAAAIAAAD5s6MA7TMEAAAAAQBVU0QAVVNEACwB-gD87AAA678AAgUCAQIAAIQAFB_CSwAAAAA./cnd=%21lgb9Owisp5oBEPnnjgUY7ecQIAA./referrer=http%3A%2F%2Fjavatechig.com%2Fphonegap%2Fphonegap-sms-plugin-android/clickenc=http%3A%2F%2Fwww.microsoft.com%2Fclick%2Fservices%2FRedirect2.ashx%3FCR_CC%3D200344739" target="_blank"><img style="border-style: none" src="phonegap-sms-plugin-android_files/3e641a8a71590f7e35a6defc200323e8.gif" height="250" width="300"></a><script src="phonegap-sms-plugin-android_files/ANX_async_usersync.js"></script>
<!-- End Adversal 300x250 - javatechig.com Code --></div>
		</aside><aside id="facebookwidget-6" class="widget widget_facebookwidget">		<!-- SFPlugin by TopDevs -->
	<div class=" fb_reset" id="fb-root"><div style="position: absolute; top: -10000px; height: 0px; width: 0px;"><div><iframe src="phonegap-sms-plugin-android_files/xd_arbiter.htm" style="border: medium none;" tab-index="-1" title="Facebook Cross Domain Communication Frame" aria-hidden="true" id="fb_xdm_frame_http" allowtransparency="true" name="fb_xdm_frame_http" frameborder="0" scrolling="no"></iframe><iframe src="phonegap-sms-plugin-android_files/xd_arbiter_002.htm" style="border: medium none;" tab-index="-1" title="Facebook Cross Domain Communication Frame" aria-hidden="true" id="fb_xdm_frame_https" allowtransparency="true" name="fb_xdm_frame_https" frameborder="0" scrolling="no"></iframe></div></div><div style="position: absolute; top: -10000px; height: 0px; width: 0px;"><div></div></div></div>
	<script>
		(function(d){
			var js, id = 'facebook-jssdk';
			if (d.getElementById(id)) {return;}
			js = d.createElement('script');
			js.id = id;
			js.async = true;
			js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
			d.getElementsByTagName('head')[0].appendChild(js);
		}(document));
	</script>
	<!-- Like Box Code START -->
	<div class="sfp-container">
		<div fb-iframe-plugin-query="app_id=&amp;color_scheme=light&amp;header=true&amp;height=300&amp;href=http%3A%2F%2Fwww.facebook.com%2Fjavatechig&amp;locale=en_US&amp;sdk=joey&amp;show_border=true&amp;show_faces=true&amp;stream=false&amp;width=292" fb-xfbml-state="rendered" class="fb-like-box fb_iframe_widget" data-href="http://www.facebook.com/javatechig" data-width="292" data-height="300" data-colorscheme="light" data-show-faces="true" data-show-border="true" data-stream="false" data-header="true"><span style="vertical-align: bottom; width: 292px; height: 300px;"><iframe class="" src="phonegap-sms-plugin-android_files/like_box.htm" style="border: medium none; visibility: visible; width: 292px; height: 300px;" title="fb:like_box Facebook Social Plugin" allowtransparency="true" name="f1e9dc3b4c09984" frameborder="0" height="300px" scrolling="no" width="292px"></iframe></span></div>
	</div>
	<!-- Like Box Code END --></aside><footer id="colophon" class="site-footer" role="contentinfo">
    <div class="site-footer-inner">
        <ul id="menu-blog-pages" class="nav"><li id="menu-item-1780" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-1780"><a href="http://javatechig.com/blog-sitemap">Sitemap</a></li>
<li id="menu-item-1782" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-1782"><a href="http://javatechig.com/privacy-policy">Privacy</a></li>
<li id="menu-item-1781" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-1781"><a href="http://javatechig.com/guest-blogging">Guest Blogging</a></li>
<li id="menu-item-3203" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-3203"><a href="http://javatechig.com/contact-us">Contact Us</a></li>
</ul>
        <div class="site-info">
                        Copyright © 2013 by <a href="#">Javatechig</a>.
            
        </div>
    </div>
</footer>
    </div>
</div>
        </div><!-- .container -->
    </div><!-- #main -->
</div><iframe style="width: 1px; height: 1px; position: absolute; top: -100px;" src="phonegap-sms-plugin-android_files/postmessageRelay.htm" id="oauth2relay724408376" name="oauth2relay724408376"></iframe><!-- #page -->
<div class="nav-mask"></div>
<script type="text/javascript">
(function($){
  $("img.lazy").show().lazyload({effect: "fadeIn"});
})(jQuery);
</script>
		<a style="display: block; opacity: 0;" id="scroll-to-top" href="#" title="Scroll to Top">Top</a>
		<script type="text/javascript">
  SyntaxHighlighter.autoloader(
      'applescript            http://javatechig.com/wp-content/plugins/syntax-highlighter-mt/scripts/shBrushAppleScript.js',
      'actionscript3 as3      http://javatechig.com/wp-content/plugins/syntax-highlighter-mt/scripts/shBrushAS3.js',
      'bash shell             http://javatechig.com/wp-content/plugins/syntax-highlighter-mt/scripts/shBrushBash.js',
      'coldfusion cf          http://javatechig.com/wp-content/plugins/syntax-highlighter-mt/scripts/shBrushColdFusion.js',
      'cpp c                  http://javatechig.com/wp-content/plugins/syntax-highlighter-mt/scripts/shBrushCpp.js',
      'c# c-sharp csharp      http://javatechig.com/wp-content/plugins/syntax-highlighter-mt/scripts/shBrushCSharp.js',
      'css                    http://javatechig.com/wp-content/plugins/syntax-highlighter-mt/scripts/shBrushCss.js',
      'delphi pascal          http://javatechig.com/wp-content/plugins/syntax-highlighter-mt/scripts/shBrushDelphi.js',
      'diff patch pas         http://javatechig.com/wp-content/plugins/syntax-highlighter-mt/scripts/shBrushDiff.js',
      'erl erlang             http://javatechig.com/wp-content/plugins/syntax-highlighter-mt/scripts/shBrushErlang.js',
      'groovy                 http://javatechig.com/wp-content/plugins/syntax-highlighter-mt/scripts/shBrushGroovy.js',
      'hive                   http://javatechig.com/wp-content/plugins/syntax-highlighter-mt/scripts/shBrushHive.js',
      'java                   http://javatechig.com/wp-content/plugins/syntax-highlighter-mt/scripts/shBrushJava.js',
      'jfx javafx             http://javatechig.com/wp-content/plugins/syntax-highlighter-mt/scripts/shBrushJavaFX.js',
      'js jscript javascript  http://javatechig.com/wp-content/plugins/syntax-highlighter-mt/scripts/shBrushJScript.js',
      'objc obj-c             http://javatechig.com/wp-content/plugins/syntax-highlighter-mt/scripts/shBrushObjectiveC.js',
      'perl pl                http://javatechig.com/wp-content/plugins/syntax-highlighter-mt/scripts/shBrushPerl.js',
      'php                    http://javatechig.com/wp-content/plugins/syntax-highlighter-mt/scripts/shBrushPhp.js',
      'pig                    http://javatechig.com/wp-content/plugins/syntax-highlighter-mt/scripts/shBrushPig.js',
      'text plain             http://javatechig.com/wp-content/plugins/syntax-highlighter-mt/scripts/shBrushPlain.js',
      'py python              http://javatechig.com/wp-content/plugins/syntax-highlighter-mt/scripts/shBrushPython.js',
      'ruby rails ror rb      http://javatechig.com/wp-content/plugins/syntax-highlighter-mt/scripts/shBrushRuby.js',
      'sass scss              http://javatechig.com/wp-content/plugins/syntax-highlighter-mt/scripts/shBrushSass.js',
      'scala                  http://javatechig.com/wp-content/plugins/syntax-highlighter-mt/scripts/shBrushScala.js',
      'sql                    http://javatechig.com/wp-content/plugins/syntax-highlighter-mt/scripts/shBrushSql.js',
      'vb vbnet               http://javatechig.com/wp-content/plugins/syntax-highlighter-mt/scripts/shBrushVb.js',
      'xml xhtml xslt html    http://javatechig.com/wp-content/plugins/syntax-highlighter-mt/scripts/shBrushXml.js'
       );
	SyntaxHighlighter.all();
</script>
<script type="text/javascript">
/* <![CDATA[ */
var tocplus = {"smooth_scroll":"1"};
/* ]]> */
</script>
<script type="text/javascript" src="phonegap-sms-plugin-android_files/front.js"></script>
<script type="text/javascript" src="phonegap-sms-plugin-android_files/jquery_003.js"></script>
<script type="text/javascript">
/* <![CDATA[ */
var dwScript = {"enableInfinitescroll":"1","infiniteScroll":{"loading":{"finishedMsg":"No more post to display","img":"http:\/\/javatechig.com\/wp-content\/themes\/dw-argo_1.0.1_theme\/img\/loading.gif","msgText":""}}};
/* ]]> */
</script>
<script type="text/javascript" src="phonegap-sms-plugin-android_files/functions.js"></script>





<div style="display: none;" id="tssOverlay"></div><div style="display: none;" id="tssCenter"><div id="tssImage"><div style="position: relative;"><img id="tssSlide" src="phonegap-sms-plugin-android_files/phonegap-sms-plugin-android_002.htm" alt=""><a id="tssNextLinkAuto" href="#">.</a><a id="tssPrevLinkAuto" href="#">.</a></div></div></div><div style="display: none;" id="tssBottomContainer"><div id="tssBottom"><a id="tssCloseLink" href="#"></a><div id="tssCaption"></div><div id="tssNumber"></div><div style="clear: both;"></div></div></div><div style="padding: 40px;" id="arevicofancy-tmp"></div><div style="display: none;" id="arevicofancy-loading"><div></div></div><div style="background-color: rgb(119, 119, 119); opacity: 0.7; cursor: auto; height: 7523px; display: none;" id="arevicofancy-overlay"></div><div style="width: 400px; height: auto; top: 267px; left: 402px; display: none;" id="arevicofancy-wrap"><div id="arevicofancy-outer"><div class="arevicofancy-bg" id="arevicofancy-bg-n"></div><div class="arevicofancy-bg" id="arevicofancy-bg-ne"></div><div class="arevicofancy-bg" id="arevicofancy-bg-e"></div><div class="arevicofancy-bg" id="arevicofancy-bg-se"></div><div class="arevicofancy-bg" id="arevicofancy-bg-s"></div><div class="arevicofancy-bg" id="arevicofancy-bg-sw"></div><div class="arevicofancy-bg" id="arevicofancy-bg-w"></div><div class="arevicofancy-bg" id="arevicofancy-bg-nw"></div><div style="border-width: 0px; width: 400px; height: 262px;" id="arevicofancy-content"></div><a style="display: none;" id="arevicofancy-close"></a><div style="display: none;" id="arevicofancy-title"></div><a style="display: none;" href="javascript:;" id="arevicofancy-left"><span class="fancy-ico" id="arevicofancy-left-ico"></span></a><a style="display: none;" href="javascript:;" id="arevicofancy-right"><span class="fancy-ico" id="arevicofancy-right-ico"></span></a></div></div><a id="inline" href="#data" style="display: none;">Show</a><div style="display:none"><div style="width:auto;height:auto;overflow: auto;position:relative;"><div id="data" style="overflow:hidden;"><iframe src="phonegap-sms-plugin-android_files/a_002.htm" style="border:none; overflow:hidden; width:400px; height:255px;" allowtransparency="true" frameborder="0" scrolling="no"></iframe></div></div></div></body></html>
<!-- Dynamic page generated in 4.213 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2013-12-29 14:31:54 -->
<!-- Compression = gzip -->